{\rtf1\adeflang1025\ansi\ansicpg1252\uc1\adeff31507\deff0\stshfdbch31506\stshfloch31506\stshfhich31506\stshfbi31507\deflang1033\deflangfe1033\themelang1033\themelangfe0\themelangcs0{\fonttbl{\f0\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f5\fbidi \fmodern\fcharset0\fprq1{\*\panose 02070409020205020404}Courier;}
{\f34\fbidi \froman\fcharset1\fprq2{\*\panose 02040503050406030204}Cambria Math;}{\f37\fbidi \fswiss\fcharset0\fprq2{\*\panose 020f0502020204030204}Calibri;}{\f39\fbidi \fswiss\fcharset0\fprq2{\*\panose 020b0604030504040204}Verdana;}
{\flomajor\f31500\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\fdbmajor\f31501\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}
{\fhimajor\f31502\fbidi \froman\fcharset0\fprq2{\*\panose 02040503050406030204}Cambria;}{\fbimajor\f31503\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}
{\flominor\f31504\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\fdbminor\f31505\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}
{\fhiminor\f31506\fbidi \fswiss\fcharset0\fprq2{\*\panose 020f0502020204030204}Calibri;}{\fbiminor\f31507\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f40\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}
{\f41\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}{\f43\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\f44\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\f45\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}
{\f46\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\f47\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\f48\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\f410\fbidi \fswiss\fcharset238\fprq2 Calibri CE;}
{\f411\fbidi \fswiss\fcharset204\fprq2 Calibri Cyr;}{\f413\fbidi \fswiss\fcharset161\fprq2 Calibri Greek;}{\f414\fbidi \fswiss\fcharset162\fprq2 Calibri Tur;}{\f417\fbidi \fswiss\fcharset186\fprq2 Calibri Baltic;}
{\f430\fbidi \fswiss\fcharset238\fprq2 Verdana CE;}{\f431\fbidi \fswiss\fcharset204\fprq2 Verdana Cyr;}{\f433\fbidi \fswiss\fcharset161\fprq2 Verdana Greek;}{\f434\fbidi \fswiss\fcharset162\fprq2 Verdana Tur;}
{\f437\fbidi \fswiss\fcharset186\fprq2 Verdana Baltic;}{\f438\fbidi \fswiss\fcharset163\fprq2 Verdana (Vietnamese);}{\flomajor\f31508\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}
{\flomajor\f31509\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}{\flomajor\f31511\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\flomajor\f31512\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}
{\flomajor\f31513\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\flomajor\f31514\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\flomajor\f31515\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}
{\flomajor\f31516\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\fdbmajor\f31518\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\fdbmajor\f31519\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}
{\fdbmajor\f31521\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\fdbmajor\f31522\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\fdbmajor\f31523\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}
{\fdbmajor\f31524\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\fdbmajor\f31525\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\fdbmajor\f31526\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}
{\fhimajor\f31528\fbidi \froman\fcharset238\fprq2 Cambria CE;}{\fhimajor\f31529\fbidi \froman\fcharset204\fprq2 Cambria Cyr;}{\fhimajor\f31531\fbidi \froman\fcharset161\fprq2 Cambria Greek;}{\fhimajor\f31532\fbidi \froman\fcharset162\fprq2 Cambria Tur;}
{\fhimajor\f31535\fbidi \froman\fcharset186\fprq2 Cambria Baltic;}{\fbimajor\f31538\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\fbimajor\f31539\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}
{\fbimajor\f31541\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\fbimajor\f31542\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\fbimajor\f31543\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}
{\fbimajor\f31544\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\fbimajor\f31545\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\fbimajor\f31546\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}
{\flominor\f31548\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\flominor\f31549\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}{\flominor\f31551\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}
{\flominor\f31552\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\flominor\f31553\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\flominor\f31554\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}
{\flominor\f31555\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\flominor\f31556\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\fdbminor\f31558\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}
{\fdbminor\f31559\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}{\fdbminor\f31561\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\fdbminor\f31562\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}
{\fdbminor\f31563\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\fdbminor\f31564\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\fdbminor\f31565\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}
{\fdbminor\f31566\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\fhiminor\f31568\fbidi \fswiss\fcharset238\fprq2 Calibri CE;}{\fhiminor\f31569\fbidi \fswiss\fcharset204\fprq2 Calibri Cyr;}
{\fhiminor\f31571\fbidi \fswiss\fcharset161\fprq2 Calibri Greek;}{\fhiminor\f31572\fbidi \fswiss\fcharset162\fprq2 Calibri Tur;}{\fhiminor\f31575\fbidi \fswiss\fcharset186\fprq2 Calibri Baltic;}
{\fbiminor\f31578\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\fbiminor\f31579\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}{\fbiminor\f31581\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}
{\fbiminor\f31582\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\fbiminor\f31583\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\fbiminor\f31584\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}
{\fbiminor\f31585\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\fbiminor\f31586\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}}{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0;
\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128;
\red192\green192\blue192;\red222\green227\blue231;\red0\green102\blue153;\red239\green239\blue239;\red0\green102\blue0;\red250\green250\blue250;\red209\green215\blue220;\red68\green68\blue68;}{\*\defchp \f31506\fs22 }{\*\defpap 
\ql \li0\ri0\sa200\sl276\slmult1\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 }\noqfpromote {\stylesheet{\ql \li0\ri0\sa200\sl276\slmult1\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 
\af31507\afs22\alang1025 \ltrch\fcs0 \f31506\fs22\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \snext0 \sqformat \spriority0 \styrsid15612453 Normal;}{\*\cs10 \additive \ssemihidden \sunhideused \spriority1 Default Paragraph Font;}{\*
\ts11\tsrowd\trftsWidthB3\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tblind0\tblindtype3\tscellwidthfts0\tsvertalt\tsbrdrt\tsbrdrl\tsbrdrb\tsbrdrr\tsbrdrdgl\tsbrdrdgr\tsbrdrh\tsbrdrv \ql \li0\ri0\sa200\sl276\slmult1
\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af31507\afs22\alang1025 \ltrch\fcs0 \f31506\fs22\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \snext11 \ssemihidden \sunhideused \sqformat Normal Table;}{\*\cs15 
\additive \rtlch\fcs1 \af0 \ltrch\fcs0 \sbasedon10 \spriority0 \styrsid9726301 apple-style-span;}{\*\cs16 \additive \rtlch\fcs1 \af0 \ltrch\fcs0 \sbasedon10 \spriority0 \styrsid9726301 apple-converted-space;}{\*\cs17 \additive \rtlch\fcs1 \af0 
\ltrch\fcs0 \ul\cf2 \sbasedon10 \ssemihidden \sunhideused \styrsid9726301 Hyperlink;}{\*\cs18 \additive \rtlch\fcs1 \af0 \ltrch\fcs0 \sbasedon10 \spriority0 \styrsid9726301 postbody;}{\*\cs19 \additive \rtlch\fcs1 \af0 \ltrch\fcs0 
\sbasedon10 \spriority0 \styrsid9726301 genmed;}}{\*\pgptbl {\pgp\ipgp0\itap0\li0\ri0\sb0\sa0}}{\*\rsidtbl \rsid8071991\rsid9726301\rsid13062812\rsid15612453}{\mmathPr\mmathFont34\mbrkBin0\mbrkBinSub0\msmallFrac0\mdispDef1\mlMargin0\mrMargin0\mdefJc1
\mwrapIndent1440\mintLim0\mnaryLim1}{\info{\author  Paul Nicholls}{\operator  Paul Nicholls}{\creatim\yr2011\mo6\dy23\hr13\min14}{\revtim\yr2011\mo6\dy23\hr16\min22}{\version1}{\edmins188}{\nofpages9}{\nofwords3607}{\nofchars20566}
{\*\company Altium Limited}{\nofcharsws24125}{\vern32771}}{\*\xmlnstbl {\xmlns1 http://schemas.microsoft.com/office/word/2003/wordml}}\paperw12240\paperh15840\margl1440\margr1440\margt1440\margb1440\gutter0\ltrsect 
\widowctrl\ftnbj\aenddoc\trackmoves1\trackformatting1\donotembedsysfont1\relyonvml0\donotembedlingdata0\grfdocevents0\validatexml1\showplaceholdtext0\ignoremixedcontent0\saveinvalidxml0\showxmlerrors1\noxlattoyen
\expshrtn\noultrlspc\dntblnsbdb\nospaceforul\formshade\horzdoc\dgmargin\dghspace180\dgvspace180\dghorigin1440\dgvorigin1440\dghshow1\dgvshow1
\jexpand\viewkind1\viewscale100\pgbrdrhead\pgbrdrfoot\splytwnine\ftnlytwnine\htmautsp\nolnhtadjtbl\useltbaln\alntblind\lytcalctblwd\lyttblrtgr\lnbrkrule\nobrkwrptbl\snaptogridincell\allowfieldendsel\wrppunct
\asianbrkrule\rsidroot9726301\newtblstyruls\nogrowautofit\usenormstyforlist\noindnmbrts\felnbrelev\nocxsptable\indrlsweleven\noafcnsttbl\afelev\utinl\hwelev\spltpgpar\notcvasp\notbrkcnstfrctbl\notvatxbx\krnprsnet\cachedcolbal \nouicompat \fet0
{\*\wgrffmtfilter 2450}\nofeaturethrottle1\ilfomacatclnup0\ltrpar \sectd \ltrsect\linex0\headery708\footery708\colsx708\endnhere\sectlinegrid360\sectdefaultcl\sectrsid15612453\sftnbj {\*\pnseclvl1\pnucrm\pnstart1\pnindent720\pnhang {\pntxta .}}
{\*\pnseclvl2\pnucltr\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl3\pndec\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl4\pnlcltr\pnstart1\pnindent720\pnhang {\pntxta )}}{\*\pnseclvl5\pndec\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}
{\*\pnseclvl6\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl7\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl8\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl9
\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}\pard\plain \ltrpar\qc \li0\ri0\sa200\sl276\slmult1\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid13062812 \rtlch\fcs1 \af31507\afs22\alang1025 \ltrch\fcs0 
\f31506\fs22\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\rtlch\fcs1 \af0\afs24 \ltrch\fcs0 \f39\fs24\cf1\insrsid9726301\charrsid13062812 Installment #1:}{\rtlch\fcs1 \af0\afs24 \ltrch\fcs0 \f39\fs24\cf1\insrsid13062812 
\par }{\rtlch\fcs1 \af0\afs24 \ltrch\fcs0 \f39\fs24\cf1\insrsid9726301\charrsid13062812 \~}{\rtlch\fcs1 \af0\afs24 \ltrch\fcs0 \b\f39\fs24\cf1\insrsid9726301\charrsid13062812 
Introduction to scaled-integer arithmetic (or: "Why you probably don't need floating-point")}{\rtlch\fcs1 \af0 \ltrch\fcs0 \b\dbch\af0\insrsid9726301\charrsid9726301 \~\line }{\rtlch\fcs1 \af0 \ltrch\fcs0 \dbch\af0\insrsid9726301\charrsid9726301 \line 
What would you think if someone told you you don't need floating-point to do logarithms, inverses and fractions, trig, roots, digital signal processing functions, or handle gigantic ranges of numbers?\~\line \line 
I was skeptical at first. It took me awhile to fully 
accept the idea, but years later now it seems like the only time I use floating-point is when I pick up my calculator. Floating-point has its place and is essential for some applications, but not as many as popularly thought.\~\line \line 
You may have done some simpl
e arithmetic on your 6502 creations but wonder how you could ever get past multiple-precision addition and subtraction. Imagine getting where you want to go with your project without the overhead and complexity of floating-point. Well, here it is.}{
\rtlch\fcs1 \af31507\afs18 \ltrch\fcs0 \cs16\f39\fs18\cf1\chshdng0\chcfpat0\chcbpat17\insrsid9726301 \~}{\rtlch\fcs1 \af31507\afs18 \ltrch\fcs0 \f39\fs18\cf1\chshdng0\chcfpat0\chcbpat17\insrsid9726301 \line \line }{\field\fldedit{\*\fldinst {\rtlch\fcs1 
\af31507\afs18 \ltrch\fcs0 \cs15\f39\fs18\cf1\chshdng0\chcfpat0\chcbpat17\insrsid9726301  HYPERLINK "http://home.iae.nl/users/mhx/sf5/sf5.html" \\t "_blank" }}{\fldrslt {\rtlch\fcs1 \af31507\afs18 \ltrch\fcs0 
\cs17\f39\fs18\ul\cf18\chshdng0\chcfpat0\chcbpat17\insrsid9726301 http://home.iae.nl/users/mhx/sf5/sf5.html}}}\sectd \ltrsect\linex0\headery708\footery708\colsx708\endnhere\sectlinegrid360\sectdefaultcl\sectrsid15612453\sftnbj {\rtlch\fcs1 \af31507\afs18 
\ltrch\fcs0 \cs16\f39\fs18\cf1\chshdng0\chcfpat0\chcbpat17\insrsid9726301 \~}{\rtlch\fcs1 \af0 \ltrch\fcs0 \dbch\af0\insrsid9726301\charrsid9726301 
is chapter 5 of Leo Brodie's book "Starting Forth" that someone keyboarded for the web. Starting about a third of the way down, it gives a reasonable 
introduction to fixed- versus floating-point math. Even if you're not familiar with Forth, it will still be mostly understandable, since it's mostly about the ranges and representations of numbers and not so much about how to do it in a particular program
ming language. (Don't even think about getting into Forth though, unless you want unlimited freedom and a several-times increase in productivity!)\~\line \line 
Brodie says, "Fixed-point arithmetic is simply a method of storing numbers in memory without storing the pos
ition of each number's decimal point. For example, in working with dollars and cents, the values can all be stored in cents. The program, rather than each individual number, keeps track of the decimal point." Although it requires that the programmer pay c
loser attention to maximze use of the available range of numbers without overflowing that range, it removes a lot of run-time overhead, and lets you get away with a smaller, simpler kernel.}{\rtlch\fcs1 \af31507\afs18 \ltrch\fcs0 
\cs16\f39\fs18\cf1\chshdng0\chcfpat0\chcbpat17\insrsid9726301 \~}{\rtlch\fcs1 \af31507\afs18 \ltrch\fcs0 \f39\fs18\cf1\chshdng0\chcfpat0\chcbpat17\insrsid9726301 \line \line }{\rtlch\fcs1 \af0 \ltrch\fcs0 \dbch\af0\insrsid9726301\charrsid9726301 
Fixed-point is a special, simple case of scaled-integer arithmeti
c, where the basic unit is represented by a whole number. In the case of dollars and cents above, one dollar will be represented by exactly 100. Scaled-integer is not always this way though. In the case of angles or portions of a circle, various factors m
ake it work out nicely to represent the circle with 65,536 if you have 16-bit cells. This means that each increment in the 16-bit cell is .0054932\'ba
, or .000095874 radians. One radian is approximately 10,430.4/65,536 of a circle. One degree is approximately 188.044/65,536 of a circle. Our 16-bit representation of 1 radian will be 28BE in hex. The representation for 1\'ba
 will be B6. Why the oddball numbers? Consider that -90\'ba is the same as +270\'ba, +370\'ba is the same as +10\'ba, etc.. The natural wrap-around is appropriate; and without using floating-point, our resolution is still better than 20 arc-seconds.\~}{
\rtlch\fcs1 \af0 \ltrch\fcs0 \f39\fs18\cf1\insrsid9726301\charrsid9726301 \line \line }{\rtlch\fcs1 \af0 \ltrch\fcs0 \dbch\af0\insrsid9726301\charrsid9726301 
In the case of the dollar above, every penny is represented by exactly one increment in the 16-bit cell (or 32-bit double number if we want to exceed 655 dollar
s and 36 cents in positive-only numbers, or +$327.67 to -$327.68 if negative numbers are allowed). That's fixed-point. In the case of the angles, we don't have an exact representation, or a nice place to put a decimal point regardless of number base, for 
the radian which is the unit used for calculating the trig functions, or even for the degree. We use scaled-integer here but not fixed-point per se.\~}{\rtlch\fcs1 \af0 \ltrch\fcs0 \f39\fs18\cf1\insrsid9726301\charrsid9726301 \line \line }{\rtlch\fcs1 
\af0 \ltrch\fcs0 \dbch\af0\insrsid9726301\charrsid9726301 All the functions we will be talking about can be pieced together with with components no more complicated
 than addition, subtraction, multiplication, and division. Well explained unsigned 6502 division routines can be found at}{\rtlch\fcs1 \af31507\afs18 \ltrch\fcs0 \cs16\f39\fs18\cf1\chshdng0\chcfpat0\chcbpat17\insrsid9726301 \~}{\field\fldedit{\*\fldinst {
\rtlch\fcs1 \af31507\afs18 \ltrch\fcs0 \cs15\f39\fs18\cf1\chshdng0\chcfpat0\chcbpat17\insrsid9726301  HYPERLINK "http://www.6502.org/source/integers/ummodfix/ummodfix.htm" \\t "_blank" }}{\fldrslt {\rtlch\fcs1 \af31507\afs18 \ltrch\fcs0 
\cs17\f39\fs18\ul\cf18\chshdng0\chcfpat0\chcbpat17\insrsid9726301 http://www.6502.org/source/integers/ummodfix/ummodfix.htm}}}\sectd \ltrsect\linex0\headery708\footery708\colsx708\endnhere\sectlinegrid360\sectdefaultcl\sectrsid15612453\sftnbj {
\rtlch\fcs1 \af31507\afs18 \ltrch\fcs0 \cs16\f39\fs18\cf1\chshdng0\chcfpat0\chcbpat17\insrsid9726301 \~}{\rtlch\fcs1 \af0 \ltrch\fcs0 \dbch\af0\insrsid9726301\charrsid9726301 . Bruce has another article in the works.\~}{\field\fldedit{\*\fldinst {
\rtlch\fcs1 \af31507\afs18 \ltrch\fcs0 \cs15\f39\fs18\cf1\chshdng0\chcfpat0\chcbpat17\insrsid9726301  HYPERLINK "http://www.6502.org/forum/viewtopic.php?t=689" \\t "_blank" }}{\fldrslt {\rtlch\fcs1 \af31507\afs18 \ltrch\fcs0 
\cs17\f39\fs18\ul\cf18\chshdng0\chcfpat0\chcbpat17\insrsid9726301 http://www.6502.org/forum/viewtopic.php?t=689}}}\sectd \ltrsect\linex0\headery708\footery708\colsx708\endnhere\sectlinegrid360\sectdefaultcl\sectrsid15612453\sftnbj {\rtlch\fcs1 \af0 
\ltrch\fcs0 \dbch\af0\insrsid9726301\charrsid9726301 \~has routines to multiply two 16-bit unsigned numbers to get a 32-bit result.}{\rtlch\fcs1 \af31507\afs18 \ltrch\fcs0 \cs16\f39\fs18\cf1\chshdng0\chcfpat0\chcbpat17\insrsid9726301 \~}
{\field\fldedit{\*\fldinst {\rtlch\fcs1 \af31507\afs18 \ltrch\fcs0 \cs15\f39\fs18\cf1\chshdng0\chcfpat0\chcbpat17\insrsid9726301  HYPERLINK "http://www.6502.org/source/integers/32muldiv.htm" \\t "_blank" }}{\fldrslt {\rtlch\fcs1 \af31507\afs18 
\ltrch\fcs0 \cs17\f39\fs18\ul\cf18\chshdng0\chcfpat0\chcbpat17\insrsid9726301 http://www.6502.org/source/integers/32muldiv.htm}}}\sectd \ltrsect\linex0\headery708\footery708\colsx708\endnhere\sectlinegrid360\sectdefaultcl\sectrsid15612453\sftnbj {
\rtlch\fcs1 \af31507\afs18 \ltrch\fcs0 \cs16\f39\fs18\cf1\chshdng0\chcfpat0\chcbpat17\insrsid9726301 \~}{\rtlch\fcs1 \af0 \ltrch\fcs0 \dbch\af0\insrsid9726301\charrsid9726301 
has routines to do 32-bit multiplications with a 64-bit result, and the vice-versa with division.\~}{\rtlch\fcs1 \af0 \ltrch\fcs0 \f39\fs18\cf1\insrsid9726301\charrsid9726301 \line \line }{\rtlch\fcs1 \af0 \ltrch\fcs0 
\dbch\af0\insrsid9726301\charrsid9726301 Often you'll want the division
 results to be rounded instead of truncated. To do that, add half the divisor's value into the dividend before dividing, and just drop the remainder after the division. (The divisor is the number you're dividing by. If you write the division problem like 
a fraction, the divisor is the denominator-- the number under the line.)
\par }\pard \ltrpar\ql \li0\ri0\sa200\sl276\slmult1\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 {\rtlch\fcs1 \af31507\afs18 \ltrch\fcs0 \cs15\f39\fs18\cf1\chshdng0\chcfpat0\chcbpat17\insrsid9726301 \page 
\par }\pard \ltrpar\qc \li0\ri0\sa200\sl276\slmult1\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid13062812 {\rtlch\fcs1 \af0\afs24 \ltrch\fcs0 \f39\fs24\cf1\insrsid9726301\charrsid9726301 Installment #2:}{\rtlch\fcs1 
\af0\afs24 \ltrch\fcs0 \f39\fs24\cf1\insrsid13062812 
\par }\pard \ltrpar\qc \li0\ri0\sa200\sl276\slmult1\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid8071991 {\rtlch\fcs1 \af0\afs24 \ltrch\fcs0 \b\f39\fs24\cf1\insrsid9726301\charrsid8071991 Staying within bounds}{\rtlch\fcs1 
\af0\afs24 \ltrch\fcs0 \b\fs24\dbch\af0\insrsid8071991\charrsid8071991 
\par }\pard \ltrpar\ql \li0\ri0\sa200\sl276\slmult1\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid13062812 {\rtlch\fcs1 \af0\afs24 \ltrch\fcs0 \f39\fs24\cf1\insrsid9726301\charrsid9726301 \line }{\rtlch\fcs1 \af0 \ltrch\fcs0 
\dbch\af0\insrsid9726301\charrsid9726301 
Clearly you will want to use the 16-bit range to your advantage, without getting the numbers so big that they overflow while you're working on them. How do you do this? Suppose you had a number, 26,541 (in base ten) and wanted to multiply it by 2/3. Since
 2/3 is between integers, the closest representation you can get directly (without scaling) is 1; but multiplying your 26,541 by 1 is not very useful and does not do what you're looking for.\~}{\rtlch\fcs1 \af0 \ltrch\fcs0 
\f39\fs18\cf1\insrsid9726301\charrsid9726301 \line \line }{\rtlch\fcs1 \af0 \ltrch\fcs0 \dbch\af0\insrsid9726301\charrsid9726301 If we first multiply by 2 and then divide the result by 3, we ge
t 53,082, and finally 17,694. Unfortunately if we're using signed numbers, the 53,082 will get interpreted as a negative number (since the high bit of the 16-bit cell is set) and we end up with -12,454/3 which is -4,151, which wrong any way you look at it
.
 Even if we were not using signed numbers, you can see that multiplying anything above 32,767 by 2 will overflow. One thing we could do is to scale our numbers lower to avoid this, but then what if we need to multiply by 1.07? Leaving room to multiply by 
107 and then divide by 100 sure wipes out a lot of our working range.\~}{\rtlch\fcs1 \af0 \ltrch\fcs0 \f39\fs18\cf1\insrsid9726301\charrsid9726301 \line \line }{\rtlch\fcs1 \af0 \ltrch\fcs0 \dbch\af0\insrsid9726301\charrsid9726301 
The better route is to use double-precision intermediate results. If we are calling 16 bits (two bytes) our standard cell size, then a double-precision number is represented by a 32-bit
 (four-byte) number, regardless of how many bits we actually need in the particular case. Now you could even take your 26,541 and multiply by 107 to get 2,839,887, and then divide by 100 to get the final result of 28,399 (rounded), which fits into a 16-bi
t
 cell just fine. In fact, Forth has an operator called */ (pronounced "star-slash") for precisely that purpose-- take the first number, multiply by the second to yield a double-precision intermediate result, and divide by the third, to get the final resul
t in single-precision. I'll add another one later that rounds the result instead of just throwing away the fractional part or leaving it for separate treatment.\~}{\rtlch\fcs1 \af0 \ltrch\fcs0 \f39\fs18\cf1\insrsid9726301\charrsid9726301 \line \line }{
\rtlch\fcs1 \af0 \ltrch\fcs0 \dbch\af0\insrsid9726301\charrsid9726301 Nearly any constant you might use in the range of \'b10.000030519 to 32767 (or \'b10.000015259 to 65
,535 if using unsigned numbers) can be approximated with different pairs of integers used as a fraction, most having an accuracy of at least 8 digits. If you want to multiply a number by the square root of two for example, first multiply by 239 and then d
i
vide your double-precision intermediate result by 169. This ratio's error is only -0.00088%, which is good enough for 16-bit work. 19601/13860 would be good approximation for the square root of 2 for 24-bit work, as it gives an error of only 0.00000013% (
1.3E-9).\~}{\rtlch\fcs1 \af0 \ltrch\fcs0 \f39\fs18\cf1\insrsid9726301\charrsid9726301 \line \line }{\rtlch\fcs1 \af0 \ltrch\fcs0 \dbch\af0\insrsid9726301\charrsid9726301 
Since the denominator of the fraction can be 0, you can even represent infinity if you need to. Consider the tangent function, which we carry out by just returning both the sine and the cosine of the angle. (To get the cotangent, all you have to 
do is swap the two numbers.) Since they both range from -1 to +1, we can chose a scale factor of up to $7FFF, so -1 is represented by -$7FFF and +1 is represented by +$7FFF. The smallest possible increment in the output numbers is 1/32,767, or 0.000030519
; yet non-negative outputs can range from 0/32,767 (for 0 at 0\'ba), to 3/32,767 (for 0.00009 at 0.0055\'ba), to 23,170/23,170 (for 1.00000 at 45\'ba), to 32,767/3 (for 10,922 at 89.995\'ba), to 32,767/0 (for infinity at 90\'ba
). Even without the "infinity at 90\'ba", you would not be able to get this kind of range from a 16-bit cell; but if you go directly to a 32-bit tangent, it's less efficient to calculate, and less efficient to use in 16-bit arithmetic.\~}{\rtlch\fcs1 
\af0 \ltrch\fcs0 \f39\fs18\cf1\insrsid9726301\charrsid9726301 \line \line }{\rtlch\fcs1 \af0 \ltrch\fcs0 \dbch\af0\insrsid9726301\charrsid9726301 Now you may have already thought ahead a little to the situation w
here a scaled number is squared, or is multiplied by another number with the same scale factor, effectively squaring the scale factor, which is undesirable. The */ operator (or its equivalent) is again used to do the multiplication and then divide the dou
ble-precision intermediate result by the scale factor. This undoes the squaring of the scale factor.\~}{\rtlch\fcs1 \af0 \ltrch\fcs0 \f39\fs18\cf1\insrsid9726301\charrsid9726301 \line \line }{\rtlch\fcs1 \af0 \ltrch\fcs0 
\dbch\af0\insrsid9726301\charrsid9726301 To get more computational speed, you can use scale factors that reduce the division to nothing more than a logical-shift-right operation. $7FFF was used a
bove for maximum precision in the sine, cosine, and tangent example since you cannot represent \'b11 with \'b1
$8000 in a 16-bit cell; but if you have an application where one bit less precision is plenty and you want more speed, you can change the scale factor t
o $4000, so dividing the 32-bit intermediate results by the $4000 is just a matter of shifting right 12 bit places.\~}{\rtlch\fcs1 \af0 \ltrch\fcs0 \f39\fs18\cf1\insrsid9726301\charrsid9726301 \line \line }{\rtlch\fcs1 \af0 \ltrch\fcs0 
\dbch\af0\insrsid9726301\charrsid9726301 The issue of staying within bounds will be addressed almost continually as we progress further into scaled-integer arithmetic.\~}{\rtlch\fcs1 \af0 \ltrch\fcs0 \f39\fs18\cf1\insrsid9726301\charrsid9726301 \line 
\line \line \line }{\rtlch\fcs1 \af0 \ltrch\fcs0 \dbch\af0\insrsid9726301\charrsid9726301 Next up: scaled-integer & fixed-point I/O in number bases other than hex? introduce the data stack concept? Dive right into some algorithms?
\par }\pard \ltrpar\ql \li0\ri0\sa200\sl276\slmult1\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 {\rtlch\fcs1 \af31507\afs18 \ltrch\fcs0 \cs15\f39\fs18\cf1\chshdng0\chcfpat0\chcbpat19\insrsid9726301 \page 
\par }\pard \ltrpar\qc \li0\ri0\sa270\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid9726301 {\rtlch\fcs1 \af0\afs24 \ltrch\fcs0 \f39\fs24\cf1\insrsid9726301\charrsid9726301 Installment #3:\~}{\rtlch\fcs1 \af0\afs24 
\ltrch\fcs0 \f39\fs24\cf1\insrsid8071991 
\par }{\rtlch\fcs1 \ab\af0\afs24 \ltrch\fcs0 \b\f39\fs24\cf1\insrsid9726301\charrsid9726301 The Data Stack
\par }\pard \ltrpar\ql \li0\ri0\sa270\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid9726301 {\rtlch\fcs1 \af0 \ltrch\fcs0 \f39\fs18\cf1\insrsid9726301\charrsid9726301 \~
(It's so practical. I just hope I won't regret introducing it so soon.)\~}{\rtlch\fcs1 \af0\afs18 \ltrch\fcs0 \f39\fs18\cf1\chshdng0\chcfpat0\chcbpat17\insrsid9726301\charrsid9726301 \line \line }{\rtlch\fcs1 \af0 \ltrch\fcs0 
\f39\fs18\cf1\insrsid9726301\charrsid9726301 
The data stack is not particularly tied to one kind of math or another (floating-point, fixed-point, etc.), but its self-maintaining property reduces the need to use variables for intermediate storage and prevents register conflicts. You don't have to wor
r
y about whether a variable or virtual register you're using for one routine might have another routine still depending on it to hold some data. Even in languages like BASIC that accept algebraic statements, internally the computer usually uses a data stac
k of some sort, even if it's the same stack as the return stack.\~}{\rtlch\fcs1 \af0\afs18 \ltrch\fcs0 \f39\fs18\cf1\chshdng0\chcfpat0\chcbpat17\insrsid9726301\charrsid9726301 \line \line }{\rtlch\fcs1 \af0 \ltrch\fcs0 
\f39\fs18\cf1\insrsid9726301\charrsid9726301 I did my first big 6502 programming project in the late 1980's, in assembly. It was for an embedded system that went on a board a little smaller than Daryl Rictor's SBC-2. In my inexperience
, I did several things that were not necessary or efficient. One of them was to do the math in floating-point, and in decimal, not hex. I determined that five bytes would accommodate the needed precision and exponent range, and had eight virtual processor
 
registers in ZP for doing the math. I started with fewer, but kept adding another and another when I'd run into more conflicts in register usage. More of these meant I could have more calculations pending, but it also made it harder to stardardize or keep
 
track of what each register was being used for. I succeeded, but only by doing a lot of drive-you-crazy mental gymnastics. A stack of 5-byte cells would have been so much easier. And if I had done the math in hex and in fixed-point and scaled-integer, the
y could have been 2-byte cells, with some higher-precision intermediate results taking two cells.\~}{\rtlch\fcs1 \af0\afs18 \ltrch\fcs0 \f39\fs18\cf1\chshdng0\chcfpat0\chcbpat17\insrsid9726301\charrsid9726301 \line \line }{\rtlch\fcs1 \af0 \ltrch\fcs0 
\f39\fs18\cf1\insrsid9726301\charrsid9726301 If you're reading this, you probably already know what the 6502's (or other processor's) hardware stack is. It is used primairy to store return addresses so 
the program counter knows where to go to get back to the calling routine when a subroutine is finished. You can go as many levels deep as you want, and there's no difficulty in keeping things straight. The housekeeping is automatic. The hardware stack can
 be used for several other purposes too, but setting up a separate stack for data to operate on and for passing parameters to subroutines gives a lightfootedness you won't get from using the hardware (return) stack alone.\~}{\rtlch\fcs1 \af0\afs18 
\ltrch\fcs0 \f39\fs18\cf1\chshdng0\chcfpat0\chcbpat17\insrsid9726301\charrsid9726301 \line \line }{\rtlch\fcs1 \af0 \ltrch\fcs0 \f39\fs18\cf1\insrsid9726301\charrsid9726301 19th-century Polish logician Jan 
Lukasiewicz theorized that the most efficient way to do calculations was to use a stack, and let operators (like + - * / ^ etc) and functions (like LOG TAN COS etc) operate on the number (or numbers) at the top of the stack (TOS). The reverse notation of 
p
utting a couple of numbers on the stack and then telling the computer what to do with them, like 3 5 + instead of 3+5, is where the term "reverse Polish notation" (RPN) comes from, not from some joke about Polacks doing things in a backwards and senseless
 way.\~}{\rtlch\fcs1 \af0\afs18 \ltrch\fcs0 \f39\fs18\cf1\chshdng0\chcfpat0\chcbpat17\insrsid9726301\charrsid9726301 \line \line }{\rtlch\fcs1 \af0 \ltrch\fcs0 \f39\fs18\cf1\insrsid9726301\charrsid9726301 
Suppose we had a stack with a 1 in the top cell, a 3 in the next, and so on, to some arbitrary depth:\~}{\rtlch\fcs1 \af0\afs27 \ltrch\fcs0 \f39\fs27\cf1\chshdng0\chcfpat0\chcbpat17\insrsid9726301\charrsid9726301 
\par \ltrrow}\trowd \irow0\irowband0\ltrrow\ts11\trqc\trgaph45\trleft-59\trftsWidth2\trwWidth4500\trautofit1\trspdl7\trspdt7\trspdb7\trspdr7\trspdfl3\trspdft3\trspdfb3\trspdfr3\trpaddl45\trpaddt45\trpaddb45\trpaddr45\trpaddfl3\trpaddft3\trpaddfb3
\trpaddfr3\tblrsid9726301\tbllkhdrrows\tbllkhdrcols\tbllknocolband\tblind0\tblindtype3 \clvertalc\clbrdrt\brdrtbl \clbrdrl\brdrtbl \clbrdrb\brdrtbl \clbrdrr\brdrtbl \cltxlrtb\clftsWidth1\clshdrawnil\clhidemark \cellx8471\pard \ltrpar
\ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\pararsid9726301 {\rtlch\fcs1 \ab\af0 \ltrch\fcs0 \b\f39\fs17\cf1\insrsid9726301\charrsid9726301 Code:}{\rtlch\fcs1 \af0\afs24 \ltrch\fcs0 
\f39\fs24\insrsid9726301\charrsid9726301 \cell }\pard \ltrpar\ql \li0\ri0\sa200\sl276\slmult1\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid9726301\charrsid9726301 
\trowd \irow0\irowband0\ltrrow\ts11\trqc\trgaph45\trleft-59\trftsWidth2\trwWidth4500\trautofit1\trspdl7\trspdt7\trspdb7\trspdr7\trspdfl3\trspdft3\trspdfb3\trspdfr3\trpaddl45\trpaddt45\trpaddb45\trpaddr45\trpaddfl3\trpaddft3\trpaddfb3
\trpaddfr3\tblrsid9726301\tbllkhdrrows\tbllkhdrcols\tbllknocolband\tblind0\tblindtype3 \clvertalc\clbrdrt\brdrtbl \clbrdrl\brdrtbl \clbrdrb\brdrtbl \clbrdrr\brdrtbl \cltxlrtb\clftsWidth1\clshdrawnil\clhidemark \cellx8471\row \ltrrow
}\trowd \irow1\irowband1\lastrow \ltrrow\ts11\trqc\trgaph45\trleft-59\trftsWidth2\trwWidth4500\trautofit1\trspdl7\trspdt7\trspdb7\trspdr7\trspdfl3\trspdft3\trspdfb3\trspdfr3\trpaddl45\trpaddt45\trpaddb45\trpaddr45\trpaddfl3\trpaddft3\trpaddfb3
\trpaddfr3\tblrsid9726301\tbllkhdrrows\tbllkhdrcols\tbllknocolband\tblind0\tblindtype3 \clvertalc\clbrdrt\brdrs\brdrw15\brdrcf22 \clbrdrl\brdrs\brdrw15\brdrcf22 \clbrdrb\brdrs\brdrw15\brdrcf22 \clbrdrr\brdrs\brdrw15\brdrcf22 
\clcbpat21\cltxlrtb\clftsWidth1\clcbpatraw21\clhidemark \cellx8471\pard \ltrpar\ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\pararsid9726301 {\rtlch\fcs1 \af0\afs17 \ltrch\fcs0 
\f5\fs17\cf20\insrsid9726301\charrsid9726301 TOS\~ 1}{\rtlch\fcs1 \af0 \ltrch\fcs0 \f5\fs17\cf20\insrsid9726301\charrsid9726301 \~}{\rtlch\fcs1 \af0\afs17 \ltrch\fcs0 \f5\fs17\cf20\insrsid9726301\charrsid9726301 \line \~ \~ \~3}{\rtlch\fcs1 \af0 
\ltrch\fcs0 \f5\fs17\cf20\insrsid9726301\charrsid9726301 \~}{\rtlch\fcs1 \af0\afs17 \ltrch\fcs0 \f5\fs17\cf20\insrsid9726301\charrsid9726301 \line \~ \~ \~5}{\rtlch\fcs1 \af0 \ltrch\fcs0 \f5\fs17\cf20\insrsid9726301\charrsid9726301 \~}{\rtlch\fcs1 
\af0\afs17 \ltrch\fcs0 \f5\fs17\cf20\insrsid9726301\charrsid9726301 \line \~ \~ \~7\cell }\pard \ltrpar\ql \li0\ri0\sa200\sl276\slmult1\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 
\f0\fs20\insrsid9726301\charrsid9726301 \trowd \irow1\irowband1\lastrow \ltrrow
\ts11\trqc\trgaph45\trleft-59\trftsWidth2\trwWidth4500\trautofit1\trspdl7\trspdt7\trspdb7\trspdr7\trspdfl3\trspdft3\trspdfb3\trspdfr3\trpaddl45\trpaddt45\trpaddb45\trpaddr45\trpaddfl3\trpaddft3\trpaddfb3
\trpaddfr3\tblrsid9726301\tbllkhdrrows\tbllkhdrcols\tbllknocolband\tblind0\tblindtype3 \clvertalc\clbrdrt\brdrs\brdrw15\brdrcf22 \clbrdrl\brdrs\brdrw15\brdrcf22 \clbrdrb\brdrs\brdrw15\brdrcf22 \clbrdrr\brdrs\brdrw15\brdrcf22 
\clcbpat21\cltxlrtb\clftsWidth1\clcbpatraw21\clhidemark \cellx8471\row }\pard \ltrpar\ql \li0\ri0\sa270\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid9726301 {\rtlch\fcs1 \af0\afs18 \ltrch\fcs0 
\f39\fs18\cf1\chshdng0\chcfpat0\chcbpat17\insrsid9726301\charrsid9726301 \line \line }{\rtlch\fcs1 \af0 \ltrch\fcs0 \f39\fs18\cf1\insrsid9726301\charrsid9726301 
If you tell the computer to add (perhaps by calling a subroutine or macro named PLUS), the top two cells will be taken off and replaced with a 4, since 3 + 1 is 4. The result will be:\~}{\rtlch\fcs1 \af0 \ltrch\fcs0 
\f39\fs27\cf1\insrsid9726301\charrsid9726301 
\par \ltrrow}\trowd \irow0\irowband0\ltrrow\ts11\trqc\trgaph45\trleft-59\trftsWidth2\trwWidth4500\trautofit1\trspdl7\trspdt7\trspdb7\trspdr7\trspdfl3\trspdft3\trspdfb3\trspdfr3\trpaddl45\trpaddt45\trpaddb45\trpaddr45\trpaddfl3\trpaddft3\trpaddfb3
\trpaddfr3\tblrsid9726301\tbllkhdrrows\tbllkhdrcols\tbllknocolband\tblind0\tblindtype3 \clvertalc\clbrdrt\brdrtbl \clbrdrl\brdrtbl \clbrdrb\brdrtbl \clbrdrr\brdrtbl \cltxlrtb\clftsWidth1\clshdrawnil\clhidemark \cellx8471\pard \ltrpar
\ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\pararsid9726301 {\rtlch\fcs1 \ab\af0 \ltrch\fcs0 \b\f39\fs17\cf1\insrsid9726301\charrsid9726301 Code:}{\rtlch\fcs1 \af0\afs24 \ltrch\fcs0 
\f39\fs24\insrsid9726301\charrsid9726301 \cell }\pard \ltrpar\ql \li0\ri0\sa200\sl276\slmult1\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid9726301\charrsid9726301 
\trowd \irow0\irowband0\ltrrow\ts11\trqc\trgaph45\trleft-59\trftsWidth2\trwWidth4500\trautofit1\trspdl7\trspdt7\trspdb7\trspdr7\trspdfl3\trspdft3\trspdfb3\trspdfr3\trpaddl45\trpaddt45\trpaddb45\trpaddr45\trpaddfl3\trpaddft3\trpaddfb3
\trpaddfr3\tblrsid9726301\tbllkhdrrows\tbllkhdrcols\tbllknocolband\tblind0\tblindtype3 \clvertalc\clbrdrt\brdrtbl \clbrdrl\brdrtbl \clbrdrb\brdrtbl \clbrdrr\brdrtbl \cltxlrtb\clftsWidth1\clshdrawnil\clhidemark \cellx8471\row \ltrrow
}\trowd \irow1\irowband1\lastrow \ltrrow\ts11\trqc\trgaph45\trleft-59\trftsWidth2\trwWidth4500\trautofit1\trspdl7\trspdt7\trspdb7\trspdr7\trspdfl3\trspdft3\trspdfb3\trspdfr3\trpaddl45\trpaddt45\trpaddb45\trpaddr45\trpaddfl3\trpaddft3\trpaddfb3
\trpaddfr3\tblrsid9726301\tbllkhdrrows\tbllkhdrcols\tbllknocolband\tblind0\tblindtype3 \clvertalc\clbrdrt\brdrs\brdrw15\brdrcf22 \clbrdrl\brdrs\brdrw15\brdrcf22 \clbrdrb\brdrs\brdrw15\brdrcf22 \clbrdrr\brdrs\brdrw15\brdrcf22 
\clcbpat21\cltxlrtb\clftsWidth1\clcbpatraw21\clhidemark \cellx8471\pard \ltrpar\ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\pararsid9726301 {\rtlch\fcs1 \af0\afs17 \ltrch\fcs0 
\f5\fs17\cf20\insrsid9726301\charrsid9726301 TOS\~ 4}{\rtlch\fcs1 \af0 \ltrch\fcs0 \f5\fs17\cf20\insrsid9726301\charrsid9726301 \~}{\rtlch\fcs1 \af0\afs17 \ltrch\fcs0 \f5\fs17\cf20\insrsid9726301\charrsid9726301 \line \~ \~ \~5}{\rtlch\fcs1 \af0 
\ltrch\fcs0 \f5\fs17\cf20\insrsid9726301\charrsid9726301 \~}{\rtlch\fcs1 \af0\afs17 \ltrch\fcs0 \f5\fs17\cf20\insrsid9726301\charrsid9726301 \line \~ \~ \~7\cell }\pard \ltrpar\ql \li0\ri0\sa200\sl276\slmult1
\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid9726301\charrsid9726301 \trowd \irow1\irowband1\lastrow \ltrrow
\ts11\trqc\trgaph45\trleft-59\trftsWidth2\trwWidth4500\trautofit1\trspdl7\trspdt7\trspdb7\trspdr7\trspdfl3\trspdft3\trspdfb3\trspdfr3\trpaddl45\trpaddt45\trpaddb45\trpaddr45\trpaddfl3\trpaddft3\trpaddfb3
\trpaddfr3\tblrsid9726301\tbllkhdrrows\tbllkhdrcols\tbllknocolband\tblind0\tblindtype3 \clvertalc\clbrdrt\brdrs\brdrw15\brdrcf22 \clbrdrl\brdrs\brdrw15\brdrcf22 \clbrdrb\brdrs\brdrw15\brdrcf22 \clbrdrr\brdrs\brdrw15\brdrcf22 
\clcbpat21\cltxlrtb\clftsWidth1\clcbpatraw21\clhidemark \cellx8471\row }\pard \ltrpar\ql \li0\ri0\sa270\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid9726301 {\rtlch\fcs1 \af0\afs18 \ltrch\fcs0 
\f39\fs18\cf1\chshdng0\chcfpat0\chcbpat17\insrsid9726301\charrsid9726301 \line }{\rtlch\fcs1 \af0 \ltrch\fcs0 \f39\fs18\cf1\insrsid9726301\charrsid9726301 
Note that the 5 and the 7 (and anything else that might be under the 7) remains undisturbed, regardless of the depth. For the PLUS operation, you don't care what else is under there or how deep the stack is. It simply does not matter.\~}{\rtlch\fcs1 
\af0\afs18 \ltrch\fcs0 \f39\fs18\cf1\chshdng0\chcfpat0\chcbpat17\insrsid9726301\charrsid9726301 \line \line }{\rtlch\fcs1 \af0 \ltrch\fcs0 \f39\fs18\cf1\insrsid9726301\charrsid9726301 If next you tell th
e computer to multiply (perhaps by calling a subroutine named MULT), the top two remaining cells will be taken off and replaced with 20, since 5 * 4 is 20:\~}{\rtlch\fcs1 \af0 \ltrch\fcs0 \f39\fs27\cf1\insrsid9726301\charrsid9726301 
\par \ltrrow}\trowd \irow0\irowband0\ltrrow\ts11\trqc\trgaph45\trleft-59\trftsWidth2\trwWidth4500\trautofit1\trspdl7\trspdt7\trspdb7\trspdr7\trspdfl3\trspdft3\trspdfb3\trspdfr3\trpaddl45\trpaddt45\trpaddb45\trpaddr45\trpaddfl3\trpaddft3\trpaddfb3
\trpaddfr3\tblrsid9726301\tbllkhdrrows\tbllkhdrcols\tbllknocolband\tblind0\tblindtype3 \clvertalc\clbrdrt\brdrtbl \clbrdrl\brdrtbl \clbrdrb\brdrtbl \clbrdrr\brdrtbl \cltxlrtb\clftsWidth1\clshdrawnil\clhidemark \cellx8471\pard \ltrpar
\ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\pararsid9726301 {\rtlch\fcs1 \ab\af0 \ltrch\fcs0 \b\f39\fs17\cf1\insrsid9726301\charrsid9726301 Code:}{\rtlch\fcs1 \af0\afs24 \ltrch\fcs0 
\f39\fs24\insrsid9726301\charrsid9726301 \cell }\pard \ltrpar\ql \li0\ri0\sa200\sl276\slmult1\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid9726301\charrsid9726301 
\trowd \irow0\irowband0\ltrrow\ts11\trqc\trgaph45\trleft-59\trftsWidth2\trwWidth4500\trautofit1\trspdl7\trspdt7\trspdb7\trspdr7\trspdfl3\trspdft3\trspdfb3\trspdfr3\trpaddl45\trpaddt45\trpaddb45\trpaddr45\trpaddfl3\trpaddft3\trpaddfb3
\trpaddfr3\tblrsid9726301\tbllkhdrrows\tbllkhdrcols\tbllknocolband\tblind0\tblindtype3 \clvertalc\clbrdrt\brdrtbl \clbrdrl\brdrtbl \clbrdrb\brdrtbl \clbrdrr\brdrtbl \cltxlrtb\clftsWidth1\clshdrawnil\clhidemark \cellx8471\row \ltrrow
}\trowd \irow1\irowband1\lastrow \ltrrow\ts11\trqc\trgaph45\trleft-59\trftsWidth2\trwWidth4500\trautofit1\trspdl7\trspdt7\trspdb7\trspdr7\trspdfl3\trspdft3\trspdfb3\trspdfr3\trpaddl45\trpaddt45\trpaddb45\trpaddr45\trpaddfl3\trpaddft3\trpaddfb3
\trpaddfr3\tblrsid9726301\tbllkhdrrows\tbllkhdrcols\tbllknocolband\tblind0\tblindtype3 \clvertalc\clbrdrt\brdrs\brdrw15\brdrcf22 \clbrdrl\brdrs\brdrw15\brdrcf22 \clbrdrb\brdrs\brdrw15\brdrcf22 \clbrdrr\brdrs\brdrw15\brdrcf22 
\clcbpat21\cltxlrtb\clftsWidth1\clcbpatraw21\clhidemark \cellx8471\pard \ltrpar\ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\pararsid9726301 {\rtlch\fcs1 \af0\afs17 \ltrch\fcs0 
\f5\fs17\cf20\insrsid9726301\charrsid9726301 TOS 20}{\rtlch\fcs1 \af0 \ltrch\fcs0 \f5\fs17\cf20\insrsid9726301\charrsid9726301 \~}{\rtlch\fcs1 \af0\afs17 \ltrch\fcs0 \f5\fs17\cf20\insrsid9726301\charrsid9726301 \line \~ \~ \~7\cell }\pard \ltrpar
\ql \li0\ri0\sa200\sl276\slmult1\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid9726301\charrsid9726301 \trowd \irow1\irowband1\lastrow \ltrrow
\ts11\trqc\trgaph45\trleft-59\trftsWidth2\trwWidth4500\trautofit1\trspdl7\trspdt7\trspdb7\trspdr7\trspdfl3\trspdft3\trspdfb3\trspdfr3\trpaddl45\trpaddt45\trpaddb45\trpaddr45\trpaddfl3\trpaddft3\trpaddfb3
\trpaddfr3\tblrsid9726301\tbllkhdrrows\tbllkhdrcols\tbllknocolband\tblind0\tblindtype3 \clvertalc\clbrdrt\brdrs\brdrw15\brdrcf22 \clbrdrl\brdrs\brdrw15\brdrcf22 \clbrdrb\brdrs\brdrw15\brdrcf22 \clbrdrr\brdrs\brdrw15\brdrcf22 
\clcbpat21\cltxlrtb\clftsWidth1\clcbpatraw21\clhidemark \cellx8471\row }\pard \ltrpar\ql \li0\ri0\sa270\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid9726301 {\rtlch\fcs1 \af0\afs18 \ltrch\fcs0 
\f39\fs18\cf1\chshdng0\chcfpat0\chcbpat17\insrsid9726301\charrsid9726301 \line }{\rtlch\fcs1 \af0 \ltrch\fcs0 \f39\fs18\cf1\insrsid9726301\charrsid9726301 
Suppose you wanted to divide that 20 by 2 now. Put the 2 on the stack. It will get pushed onto the top:\~}{\rtlch\fcs1 \af0 \ltrch\fcs0 \f39\fs27\cf1\insrsid9726301\charrsid9726301 
\par \ltrrow}\trowd \irow0\irowband0\ltrrow\ts11\trqc\trgaph45\trleft-59\trftsWidth2\trwWidth4500\trautofit1\trspdl7\trspdt7\trspdb7\trspdr7\trspdfl3\trspdft3\trspdfb3\trspdfr3\trpaddl45\trpaddt45\trpaddb45\trpaddr45\trpaddfl3\trpaddft3\trpaddfb3
\trpaddfr3\tblrsid9726301\tbllkhdrrows\tbllkhdrcols\tbllknocolband\tblind0\tblindtype3 \clvertalc\clbrdrt\brdrtbl \clbrdrl\brdrtbl \clbrdrb\brdrtbl \clbrdrr\brdrtbl \cltxlrtb\clftsWidth1\clshdrawnil\clhidemark \cellx8471\pard \ltrpar
\ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\pararsid9726301 {\rtlch\fcs1 \ab\af0 \ltrch\fcs0 \b\f39\fs17\cf1\insrsid9726301\charrsid9726301 Code:}{\rtlch\fcs1 \af0\afs24 \ltrch\fcs0 
\f39\fs24\insrsid9726301\charrsid9726301 \cell }\pard \ltrpar\ql \li0\ri0\sa200\sl276\slmult1\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid9726301\charrsid9726301 
\trowd \irow0\irowband0\ltrrow\ts11\trqc\trgaph45\trleft-59\trftsWidth2\trwWidth4500\trautofit1\trspdl7\trspdt7\trspdb7\trspdr7\trspdfl3\trspdft3\trspdfb3\trspdfr3\trpaddl45\trpaddt45\trpaddb45\trpaddr45\trpaddfl3\trpaddft3\trpaddfb3
\trpaddfr3\tblrsid9726301\tbllkhdrrows\tbllkhdrcols\tbllknocolband\tblind0\tblindtype3 \clvertalc\clbrdrt\brdrtbl \clbrdrl\brdrtbl \clbrdrb\brdrtbl \clbrdrr\brdrtbl \cltxlrtb\clftsWidth1\clshdrawnil\clhidemark \cellx8471\row \ltrrow
}\trowd \irow1\irowband1\lastrow \ltrrow\ts11\trqc\trgaph45\trleft-59\trftsWidth2\trwWidth4500\trautofit1\trspdl7\trspdt7\trspdb7\trspdr7\trspdfl3\trspdft3\trspdfb3\trspdfr3\trpaddl45\trpaddt45\trpaddb45\trpaddr45\trpaddfl3\trpaddft3\trpaddfb3
\trpaddfr3\tblrsid9726301\tbllkhdrrows\tbllkhdrcols\tbllknocolband\tblind0\tblindtype3 \clvertalc\clbrdrt\brdrs\brdrw15\brdrcf22 \clbrdrl\brdrs\brdrw15\brdrcf22 \clbrdrb\brdrs\brdrw15\brdrcf22 \clbrdrr\brdrs\brdrw15\brdrcf22 
\clcbpat21\cltxlrtb\clftsWidth1\clcbpatraw21\clhidemark \cellx8471\pard \ltrpar\ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\pararsid9726301 {\rtlch\fcs1 \af0\afs17 \ltrch\fcs0 
\f5\fs17\cf20\insrsid9726301\charrsid9726301 TOS\~ 2}{\rtlch\fcs1 \af0 \ltrch\fcs0 \f5\fs17\cf20\insrsid9726301\charrsid9726301 \~}{\rtlch\fcs1 \af0\afs17 \ltrch\fcs0 \f5\fs17\cf20\insrsid9726301\charrsid9726301 \line \~ \~ 20}{\rtlch\fcs1 \af0 
\ltrch\fcs0 \f5\fs17\cf20\insrsid9726301\charrsid9726301 \~}{\rtlch\fcs1 \af0\afs17 \ltrch\fcs0 \f5\fs17\cf20\insrsid9726301\charrsid9726301 \line \~ \~ \~7\cell }\pard \ltrpar\ql \li0\ri0\sa200\sl276\slmult1
\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid9726301\charrsid9726301 \trowd \irow1\irowband1\lastrow \ltrrow
\ts11\trqc\trgaph45\trleft-59\trftsWidth2\trwWidth4500\trautofit1\trspdl7\trspdt7\trspdb7\trspdr7\trspdfl3\trspdft3\trspdfb3\trspdfr3\trpaddl45\trpaddt45\trpaddb45\trpaddr45\trpaddfl3\trpaddft3\trpaddfb3
\trpaddfr3\tblrsid9726301\tbllkhdrrows\tbllkhdrcols\tbllknocolband\tblind0\tblindtype3 \clvertalc\clbrdrt\brdrs\brdrw15\brdrcf22 \clbrdrl\brdrs\brdrw15\brdrcf22 \clbrdrb\brdrs\brdrw15\brdrcf22 \clbrdrr\brdrs\brdrw15\brdrcf22 
\clcbpat21\cltxlrtb\clftsWidth1\clcbpatraw21\clhidemark \cellx8471\row }\pard \ltrpar\ql \li0\ri0\sa270\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid9726301 {\rtlch\fcs1 \af0\afs18 \ltrch\fcs0 
\f39\fs18\cf1\chshdng0\chcfpat0\chcbpat17\insrsid9726301\charrsid9726301 \line }{\rtlch\fcs1 \af0 \ltrch\fcs0 \f39\fs18\cf1\insrsid9726301\charrsid9726301 Then divide (perhaps by calling a subroutine named DIV). You'll get:\~}{\rtlch\fcs1 \af0 
\ltrch\fcs0 \f39\fs27\cf1\insrsid9726301\charrsid9726301 
\par \ltrrow}\trowd \irow0\irowband0\ltrrow\ts11\trqc\trgaph45\trleft-59\trftsWidth2\trwWidth4500\trautofit1\trspdl7\trspdt7\trspdb7\trspdr7\trspdfl3\trspdft3\trspdfb3\trspdfr3\trpaddl45\trpaddt45\trpaddb45\trpaddr45\trpaddfl3\trpaddft3\trpaddfb3
\trpaddfr3\tblrsid9726301\tbllkhdrrows\tbllkhdrcols\tbllknocolband\tblind0\tblindtype3 \clvertalc\clbrdrt\brdrtbl \clbrdrl\brdrtbl \clbrdrb\brdrtbl \clbrdrr\brdrtbl \cltxlrtb\clftsWidth1\clshdrawnil\clhidemark \cellx8471\pard \ltrpar
\ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\pararsid9726301 {\rtlch\fcs1 \ab\af0 \ltrch\fcs0 \b\f39\fs17\cf1\insrsid9726301\charrsid9726301 Code:}{\rtlch\fcs1 \af0\afs24 \ltrch\fcs0 
\f39\fs24\insrsid9726301\charrsid9726301 \cell }\pard \ltrpar\ql \li0\ri0\sa200\sl276\slmult1\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid9726301\charrsid9726301 
\trowd \irow0\irowband0\ltrrow\ts11\trqc\trgaph45\trleft-59\trftsWidth2\trwWidth4500\trautofit1\trspdl7\trspdt7\trspdb7\trspdr7\trspdfl3\trspdft3\trspdfb3\trspdfr3\trpaddl45\trpaddt45\trpaddb45\trpaddr45\trpaddfl3\trpaddft3\trpaddfb3
\trpaddfr3\tblrsid9726301\tbllkhdrrows\tbllkhdrcols\tbllknocolband\tblind0\tblindtype3 \clvertalc\clbrdrt\brdrtbl \clbrdrl\brdrtbl \clbrdrb\brdrtbl \clbrdrr\brdrtbl \cltxlrtb\clftsWidth1\clshdrawnil\clhidemark \cellx8471\row \ltrrow
}\trowd \irow1\irowband1\lastrow \ltrrow\ts11\trqc\trgaph45\trleft-59\trftsWidth2\trwWidth4500\trautofit1\trspdl7\trspdt7\trspdb7\trspdr7\trspdfl3\trspdft3\trspdfb3\trspdfr3\trpaddl45\trpaddt45\trpaddb45\trpaddr45\trpaddfl3\trpaddft3\trpaddfb3
\trpaddfr3\tblrsid9726301\tbllkhdrrows\tbllkhdrcols\tbllknocolband\tblind0\tblindtype3 \clvertalc\clbrdrt\brdrs\brdrw15\brdrcf22 \clbrdrl\brdrs\brdrw15\brdrcf22 \clbrdrb\brdrs\brdrw15\brdrcf22 \clbrdrr\brdrs\brdrw15\brdrcf22 
\clcbpat21\cltxlrtb\clftsWidth1\clcbpatraw21\clhidemark \cellx8471\pard \ltrpar\ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\pararsid9726301 {\rtlch\fcs1 \af0\afs17 \ltrch\fcs0 
\f5\fs17\cf20\insrsid9726301\charrsid9726301 TOS 10}{\rtlch\fcs1 \af0 \ltrch\fcs0 \f5\fs17\cf20\insrsid9726301\charrsid9726301 \~}{\rtlch\fcs1 \af0\afs17 \ltrch\fcs0 \f5\fs17\cf20\insrsid9726301\charrsid9726301 \line \~ \~ \~7\cell }\pard \ltrpar
\ql \li0\ri0\sa200\sl276\slmult1\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid9726301\charrsid9726301 \trowd \irow1\irowband1\lastrow \ltrrow
\ts11\trqc\trgaph45\trleft-59\trftsWidth2\trwWidth4500\trautofit1\trspdl7\trspdt7\trspdb7\trspdr7\trspdfl3\trspdft3\trspdfb3\trspdfr3\trpaddl45\trpaddt45\trpaddb45\trpaddr45\trpaddfl3\trpaddft3\trpaddfb3
\trpaddfr3\tblrsid9726301\tbllkhdrrows\tbllkhdrcols\tbllknocolband\tblind0\tblindtype3 \clvertalc\clbrdrt\brdrs\brdrw15\brdrcf22 \clbrdrl\brdrs\brdrw15\brdrcf22 \clbrdrb\brdrs\brdrw15\brdrcf22 \clbrdrr\brdrs\brdrw15\brdrcf22 
\clcbpat21\cltxlrtb\clftsWidth1\clcbpatraw21\clhidemark \cellx8471\row }\pard \ltrpar\ql \li0\ri0\sa270\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid9726301 {\rtlch\fcs1 \af0\afs18 \ltrch\fcs0 
\f39\fs18\cf1\chshdng0\chcfpat0\chcbpat17\insrsid9726301\charrsid9726301 \line }{\rtlch\fcs1 \af0 \ltrch\fcs0 \f39\fs18\cf1\insrsid9726301\charrsid9726301 
Hewlett-Packard calculators all used to work this way, calling the top of the stack (TOS) the X register, the next one (next on stack, or NOS) Y, the next one Z, and the last one T. If you're familiar with HP calculators from the 1980's, you've already go
t it down. The HP manuals always drew the stack up-side-down so X was always at the bottom and things get pushed up instead of down, but it's the same idea.\~}{\rtlch\fcs1 \af0\afs18 \ltrch\fcs0 
\f39\fs18\cf1\chshdng0\chcfpat0\chcbpat17\insrsid9726301\charrsid9726301 \line \line }{\rtlch\fcs1 \af0 \ltrch\fcs0 \f39\fs18\cf1\insrsid9726301\charrsid9726301 
There is nothing however that says a stack has to be limited to four levels like the Hewlett-Packa
rd calculators had. When HP arrived at the 4-level stack, calculators were not programmable yet, so you did have to keep a mental note of what was on each level. There was no program running the process and keeping track of subroutines and their data stac
k usage, and HP determined that it was unrealistic to mentally keep track of more than four. When we move to programming, that runtime limitation is gone.\~}{\rtlch\fcs1 \af0\afs18 \ltrch\fcs0 
\f39\fs18\cf1\chshdng0\chcfpat0\chcbpat17\insrsid9726301\charrsid9726301 \line \line }{\rtlch\fcs1 \af0 \ltrch\fcs0 \f39\fs18\cf1\insrsid9726301\charrsid9726301 
You can have lots of nested subroutines, each one using data stack space and leaving operations pend
ing until the completion of the subroutines they called. Letting the stack get really deep does not make it unwieldy. If, for example, each subroutine used only three levels (or less, as is often the case), then you're only concerned with those few cells 
a
t the time you're working on that routine-- regardless of how many levels are below it. In the diagrams above, you could have a hundred numbers under those top stack items we were dealing with, and it wouldn't matter. In fact, even the 7 never got touched
 
in these examples. Subroutines automatically leave other subroutines' "scratchpad space" on the stack undisturbed. In fact, "recursion" refers to when a routine calls itself, even multiple nested levels deep, which a stack allows it to do. (As you might e
xpect, it is important to make sure that the condition to back out of the recursion is met before you overrun the available stack space.)\~}{\rtlch\fcs1 \af0\afs18 \ltrch\fcs0 \f39\fs18\cf1\chshdng0\chcfpat0\chcbpat17\insrsid9726301\charrsid9726301 \line 
\line }{\rtlch\fcs1 \af0 \ltrch\fcs0 \f39\fs18\cf1\insrsid9726301\charrsid9726301 There are various ways to accommodate a data stack in 6502 memory. 6502 Forth implementations put the data stack in z
ero page because the stack is also used to calculate addresses, and indexed indirect addressing like LDA (zp,x) is needed for certain operations. For this math treatise, we will, at least initially, limit our use of such a data stack to just the math data
 we will operate on, and not addresses. This means that since the 6502's non-ZP addressing can be indexed (LDA abs,X being an example), you can put the data stack anywhere in RAM with only a small speed penalty, as discussed at\~}
{\field\fldedit{\*\fldinst {\rtlch\fcs1 \af0 \ltrch\fcs0 \f39\fs18\cf1\insrsid9726301\charrsid9726301  HYPERLINK "http://www.6502.org/forum/viewtopic.php?t=493" \\t "_blank" }}{\fldrslt {\rtlch\fcs1 \af0 \ltrch\fcs0 
\f39\fs18\ul\cf18\insrsid9726301\charrsid9726301 www.6502.org/forum/viewtopic.php?t=493}}}\sectd \ltrsect\linex0\headery708\footery708\colsx708\endnhere\sectlinegrid360\sectdefaultcl\sectrsid15612453\sftnbj {\rtlch\fcs1 \af0 \ltrch\fcs0 
\f39\fs18\cf1\insrsid9726301\charrsid9726301 \~and other places on the forum.\~}{\rtlch\fcs1 \af0\afs18 \ltrch\fcs0 \f39\fs18\cf1\chshdng0\chcfpat0\chcbpat17\insrsid9726301\charrsid9726301 \line \line }{\rtlch\fcs1 \af0 \ltrch\fcs0 
\f39\fs18\cf1\insrsid9726301\charrsid9726301 
I initially started writing the examples for a data stack with the low bytes starting at $03FF and growing downward as you add cells to the stack, and the high bytes starting at $04FF and growing downward; but I ran into a disadvantage in that the lack of
 
an STY abs,X makes some code more awkward and inefficient, so I went back to putting the stack in ZP. And as long as it's in ZP, the possible future desire to use the high and low byte together as addresses for indirects means we might as well put the byt
e pairs together.\~}{\rtlch\fcs1 \af0\afs18 \ltrch\fcs0 \f39\fs18\cf1\chshdng0\chcfpat0\chcbpat17\insrsid9726301\charrsid9726301 \line \line }{\rtlch\fcs1 \af0 \ltrch\fcs0 \f39\fs18\cf1\insrsid9726301\charrsid9726301 
For 16-bit cells, we'll need two bytes per cell. We will also need a pointer to tell where the top of the stack is. Index register X works best because of the available addressing modes. With the two bytes of each cell together now, push
ing or pulling each stack item will consist of decrementing or incrementing X twice. Suppose we start at the high end of ZP for the data stack, and grow the stack downward (which is what happens with the return stack you're already familiar with). X could
 
be initialized to 00. To push a number on the stack, we decrement X twice with DEX DEX, which puts X to $FE; then store the low byte with STA 0,X, re-load A as necessary, and store the high byte with STA 1,X. This means the low byte of the first stack ite
m
 will get stored at $00FE, and the high byte will get stored at $00FF. If we want to put another 16-bit number on the stack, we do the same thing again. The exact same instructions and operands are used regardless of how deep the stack is at the time, or 
which routine is using them.\~}{\rtlch\fcs1 \af0\afs18 \ltrch\fcs0 \f39\fs18\cf1\chshdng0\chcfpat0\chcbpat17\insrsid9726301\charrsid9726301 \line \line }{\rtlch\fcs1 \af0 \ltrch\fcs0 \f39\fs18\cf1\insrsid9726301\charrsid9726301 
Dropping the top stack cell is accomplished with INX INX. To make the function more clear in the code, you could make it a macro:\~}{\rtlch\fcs1 \af0 \ltrch\fcs0 \f39\fs27\cf1\insrsid9726301\charrsid9726301 
\par \ltrrow}\trowd \irow0\irowband0\ltrrow\ts11\trqc\trgaph45\trleft-59\trftsWidth2\trwWidth4500\trautofit1\trspdl7\trspdt7\trspdb7\trspdr7\trspdfl3\trspdft3\trspdfb3\trspdfr3\trpaddl45\trpaddt45\trpaddb45\trpaddr45\trpaddfl3\trpaddft3\trpaddfb3
\trpaddfr3\tblrsid9726301\tbllkhdrrows\tbllkhdrcols\tbllknocolband\tblind0\tblindtype3 \clvertalc\clbrdrt\brdrtbl \clbrdrl\brdrtbl \clbrdrb\brdrtbl \clbrdrr\brdrtbl \cltxlrtb\clftsWidth1\clshdrawnil\clhidemark \cellx8471\pard \ltrpar
\ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\pararsid9726301 {\rtlch\fcs1 \ab\af0 \ltrch\fcs0 \b\f39\fs17\cf1\insrsid9726301\charrsid9726301 Code:}{\rtlch\fcs1 \af0\afs24 \ltrch\fcs0 
\f39\fs24\insrsid9726301\charrsid9726301 \cell }\pard \ltrpar\ql \li0\ri0\sa200\sl276\slmult1\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid9726301\charrsid9726301 
\trowd \irow0\irowband0\ltrrow\ts11\trqc\trgaph45\trleft-59\trftsWidth2\trwWidth4500\trautofit1\trspdl7\trspdt7\trspdb7\trspdr7\trspdfl3\trspdft3\trspdfb3\trspdfr3\trpaddl45\trpaddt45\trpaddb45\trpaddr45\trpaddfl3\trpaddft3\trpaddfb3
\trpaddfr3\tblrsid9726301\tbllkhdrrows\tbllkhdrcols\tbllknocolband\tblind0\tblindtype3 \clvertalc\clbrdrt\brdrtbl \clbrdrl\brdrtbl \clbrdrb\brdrtbl \clbrdrr\brdrtbl \cltxlrtb\clftsWidth1\clshdrawnil\clhidemark \cellx8471\row \ltrrow
}\trowd \irow1\irowband1\lastrow \ltrrow\ts11\trqc\trgaph45\trleft-59\trftsWidth2\trwWidth4500\trautofit1\trspdl7\trspdt7\trspdb7\trspdr7\trspdfl3\trspdft3\trspdfb3\trspdfr3\trpaddl45\trpaddt45\trpaddb45\trpaddr45\trpaddfl3\trpaddft3\trpaddfb3
\trpaddfr3\tblrsid9726301\tbllkhdrrows\tbllkhdrcols\tbllknocolband\tblind0\tblindtype3 \clvertalc\clbrdrt\brdrs\brdrw15\brdrcf22 \clbrdrl\brdrs\brdrw15\brdrcf22 \clbrdrb\brdrs\brdrw15\brdrcf22 \clbrdrr\brdrs\brdrw15\brdrcf22 
\clcbpat21\cltxlrtb\clftsWidth1\clcbpatraw21\clhidemark \cellx8471\pard \ltrpar\ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\pararsid9726301 {\rtlch\fcs1 \af0\afs17 \ltrch\fcs0 
\f5\fs17\cf20\insrsid9726301\charrsid9726301 DROP:\~ MACRO}{\rtlch\fcs1 \af0 \ltrch\fcs0 \f5\fs17\cf20\insrsid9726301\charrsid9726301 \~}{\rtlch\fcs1 \af0\afs17 \ltrch\fcs0 \f5\fs17\cf20\insrsid9726301\charrsid9726301 \line \~ \~ \~ \~INX}{\rtlch\fcs1 
\af0 \ltrch\fcs0 \f5\fs17\cf20\insrsid9726301\charrsid9726301 \~}{\rtlch\fcs1 \af0\afs17 \ltrch\fcs0 \f5\fs17\cf20\insrsid9726301\charrsid9726301 \line \~ \~ \~ \~INX}{\rtlch\fcs1 \af0 \ltrch\fcs0 \f5\fs17\cf20\insrsid9726301\charrsid9726301 \~}{
\rtlch\fcs1 \af0\afs17 \ltrch\fcs0 \f5\fs17\cf20\insrsid9726301\charrsid9726301 \line \~ \~ \~ \~ENDM\cell }\pard \ltrpar\ql \li0\ri0\sa200\sl276\slmult1\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\rtlch\fcs1 \af0\afs20 
\ltrch\fcs0 \f0\fs20\insrsid9726301\charrsid9726301 \trowd \irow1\irowband1\lastrow \ltrrow
\ts11\trqc\trgaph45\trleft-59\trftsWidth2\trwWidth4500\trautofit1\trspdl7\trspdt7\trspdb7\trspdr7\trspdfl3\trspdft3\trspdfb3\trspdfr3\trpaddl45\trpaddt45\trpaddb45\trpaddr45\trpaddfl3\trpaddft3\trpaddfb3
\trpaddfr3\tblrsid9726301\tbllkhdrrows\tbllkhdrcols\tbllknocolband\tblind0\tblindtype3 \clvertalc\clbrdrt\brdrs\brdrw15\brdrcf22 \clbrdrl\brdrs\brdrw15\brdrcf22 \clbrdrb\brdrs\brdrw15\brdrcf22 \clbrdrr\brdrs\brdrw15\brdrcf22 
\clcbpat21\cltxlrtb\clftsWidth1\clcbpatraw21\clhidemark \cellx8471\row }\pard \ltrpar\ql \li0\ri0\sa270\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid9726301 {\rtlch\fcs1 \af0\afs18 \ltrch\fcs0 
\f39\fs18\cf1\chshdng0\chcfpat0\chcbpat17\insrsid9726301\charrsid9726301 \line }{\rtlch\fcs1 \af0 \ltrch\fcs0 \f39\fs18\cf1\insrsid9726301\charrsid9726301 
It couldn't get much simpler. Now every time your assembly code has the line "DROP", the assembler lays down two INX instructions. It's the same thing, but DROP tells\~}{\rtlch\fcs1 \af0 \ltrch\fcs0 \f39\fs18\ul\cf1\insrsid9726301\charrsid9726301 why}{
\rtlch\fcs1 \af0 \ltrch\fcs0 \f39\fs18\cf1\insrsid9726301\charrsid9726301 \~you're incrementing X. Using a DROP subroutine and calling it with JSR DROP would tak
e an additional byte and four times as many clocks (plus the 3-byte one-time memory expense of the subroutine itself).\~}{\rtlch\fcs1 \af0\afs18 \ltrch\fcs0 \f39\fs18\cf1\chshdng0\chcfpat0\chcbpat17\insrsid9726301\charrsid9726301 \line \line }{
\rtlch\fcs1 \af0 \ltrch\fcs0 \f39\fs18\cf1\insrsid9726301\charrsid9726301 Swapping the top two cells on the stack can be accomplished with:\~}{\rtlch\fcs1 \af0 \ltrch\fcs0 \f39\fs27\cf1\insrsid9726301\charrsid9726301 
\par \ltrrow}\trowd \irow0\irowband0\ltrrow\ts11\trqc\trgaph45\trleft-59\trftsWidth2\trwWidth4500\trautofit1\trspdl7\trspdt7\trspdb7\trspdr7\trspdfl3\trspdft3\trspdfb3\trspdfr3\trpaddl45\trpaddt45\trpaddb45\trpaddr45\trpaddfl3\trpaddft3\trpaddfb3
\trpaddfr3\tblrsid9726301\tbllkhdrrows\tbllkhdrcols\tbllknocolband\tblind0\tblindtype3 \clvertalc\clbrdrt\brdrtbl \clbrdrl\brdrtbl \clbrdrb\brdrtbl \clbrdrr\brdrtbl \cltxlrtb\clftsWidth1\clshdrawnil\clhidemark \cellx8471\pard \ltrpar
\ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\pararsid9726301 {\rtlch\fcs1 \ab\af0 \ltrch\fcs0 \b\f39\fs17\cf1\insrsid9726301\charrsid9726301 Code:}{\rtlch\fcs1 \af0\afs24 \ltrch\fcs0 
\f39\fs24\insrsid9726301\charrsid9726301 \cell }\pard \ltrpar\ql \li0\ri0\sa200\sl276\slmult1\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid9726301\charrsid9726301 
\trowd \irow0\irowband0\ltrrow\ts11\trqc\trgaph45\trleft-59\trftsWidth2\trwWidth4500\trautofit1\trspdl7\trspdt7\trspdb7\trspdr7\trspdfl3\trspdft3\trspdfb3\trspdfr3\trpaddl45\trpaddt45\trpaddb45\trpaddr45\trpaddfl3\trpaddft3\trpaddfb3
\trpaddfr3\tblrsid9726301\tbllkhdrrows\tbllkhdrcols\tbllknocolband\tblind0\tblindtype3 \clvertalc\clbrdrt\brdrtbl \clbrdrl\brdrtbl \clbrdrb\brdrtbl \clbrdrr\brdrtbl \cltxlrtb\clftsWidth1\clshdrawnil\clhidemark \cellx8471\row \ltrrow
}\trowd \irow1\irowband1\lastrow \ltrrow\ts11\trqc\trgaph45\trleft-59\trftsWidth2\trwWidth4500\trautofit1\trspdl7\trspdt7\trspdb7\trspdr7\trspdfl3\trspdft3\trspdfb3\trspdfr3\trpaddl45\trpaddt45\trpaddb45\trpaddr45\trpaddfl3\trpaddft3\trpaddfb3
\trpaddfr3\tblrsid9726301\tbllkhdrrows\tbllkhdrcols\tbllknocolband\tblind0\tblindtype3 \clvertalc\clbrdrt\brdrs\brdrw15\brdrcf22 \clbrdrl\brdrs\brdrw15\brdrcf22 \clbrdrb\brdrs\brdrw15\brdrcf22 \clbrdrr\brdrs\brdrw15\brdrcf22 
\clcbpat21\cltxlrtb\clftsWidth1\clcbpatraw21\clhidemark \cellx8471\pard \ltrpar\ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\pararsid9726301 {\rtlch\fcs1 \af0\afs17 \ltrch\fcs0 
\f5\fs17\cf20\insrsid9726301\charrsid9726301 SWAP:\~ \~LDA\~ 0,X\~ \~; Swap low bytes of the two two-byte cells,}{\rtlch\fcs1 \af0 \ltrch\fcs0 \f5\fs17\cf20\insrsid9726301\charrsid9726301 \~}{\rtlch\fcs1 \af0\afs17 \ltrch\fcs0 
\f5\fs17\cf20\insrsid9726301\charrsid9726301 \line \~ \~ \~ \~ LDY\~ 2,X}{\rtlch\fcs1 \af0 \ltrch\fcs0 \f5\fs17\cf20\insrsid9726301\charrsid9726301 \~}{\rtlch\fcs1 \af0\afs17 \ltrch\fcs0 \f5\fs17\cf20\insrsid9726301\charrsid9726301 \line \~ \~ \~ \~ STA\~
 2,X}{\rtlch\fcs1 \af0 \ltrch\fcs0 \f5\fs17\cf20\insrsid9726301\charrsid9726301 \~}{\rtlch\fcs1 \af0\afs17 \ltrch\fcs0 \f5\fs17\cf20\insrsid9726301\charrsid9726301 \line \~ \~ \~ \~ STY\~ 0,X}{\rtlch\fcs1 \af0 \ltrch\fcs0 
\f5\fs17\cf20\insrsid9726301\charrsid9726301 \~}{\rtlch\fcs1 \af0\afs17 \ltrch\fcs0 \f5\fs17\cf20\insrsid9726301\charrsid9726301 \line \~}{\rtlch\fcs1 \af0 \ltrch\fcs0 \f5\fs17\cf20\insrsid9726301\charrsid9726301 \~}{\rtlch\fcs1 \af0\afs17 \ltrch\fcs0 
\f5\fs17\cf20\insrsid9726301\charrsid9726301 \line \~ \~ \~ \~ LDA\~ 1,X\~ \~; followed by the high bytes.}{\rtlch\fcs1 \af0 \ltrch\fcs0 \f5\fs17\cf20\insrsid9726301\charrsid9726301 \~}{\rtlch\fcs1 \af0\afs17 \ltrch\fcs0 
\f5\fs17\cf20\insrsid9726301\charrsid9726301 \line \~ \~ \~ \~ LDY\~ 3,X}{\rtlch\fcs1 \af0 \ltrch\fcs0 \f5\fs17\cf20\insrsid9726301\charrsid9726301 \~}{\rtlch\fcs1 \af0\afs17 \ltrch\fcs0 \f5\fs17\cf20\insrsid9726301\charrsid9726301 \line \~ \~ \~ \~ STA\~
 3,X}{\rtlch\fcs1 \af0 \ltrch\fcs0 \f5\fs17\cf20\insrsid9726301\charrsid9726301 \~}{\rtlch\fcs1 \af0\afs17 \ltrch\fcs0 \f5\fs17\cf20\insrsid9726301\charrsid9726301 \line \~ \~ \~ \~ STY\~ 1,X}{\rtlch\fcs1 \af0 \ltrch\fcs0 
\f5\fs17\cf20\insrsid9726301\charrsid9726301 \~}{\rtlch\fcs1 \af0\afs17 \ltrch\fcs0 \f5\fs17\cf20\insrsid9726301\charrsid9726301 \line \line \~ \~ \~ \~ RTS}{\rtlch\fcs1 \af0 \ltrch\fcs0 \f5\fs17\cf20\insrsid9726301\charrsid9726301 \~}{\rtlch\fcs1 
\af0\afs17 \ltrch\fcs0 \f5\fs17\cf20\insrsid9726301\charrsid9726301 \line \~;--------------\cell }\pard \ltrpar\ql \li0\ri0\sa200\sl276\slmult1\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 
\f0\fs20\insrsid9726301\charrsid9726301 \trowd \irow1\irowband1\lastrow \ltrrow
\ts11\trqc\trgaph45\trleft-59\trftsWidth2\trwWidth4500\trautofit1\trspdl7\trspdt7\trspdb7\trspdr7\trspdfl3\trspdft3\trspdfb3\trspdfr3\trpaddl45\trpaddt45\trpaddb45\trpaddr45\trpaddfl3\trpaddft3\trpaddfb3
\trpaddfr3\tblrsid9726301\tbllkhdrrows\tbllkhdrcols\tbllknocolband\tblind0\tblindtype3 \clvertalc\clbrdrt\brdrs\brdrw15\brdrcf22 \clbrdrl\brdrs\brdrw15\brdrcf22 \clbrdrb\brdrs\brdrw15\brdrcf22 \clbrdrr\brdrs\brdrw15\brdrcf22 
\clcbpat21\cltxlrtb\clftsWidth1\clcbpatraw21\clhidemark \cellx8471\row }\pard \ltrpar\ql \li0\ri0\sa270\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid9726301 {\rtlch\fcs1 \af0\afs18 \ltrch\fcs0 
\f39\fs18\cf1\chshdng0\chcfpat0\chcbpat17\insrsid9726301\charrsid9726301 \line }{\rtlch\fcs1 \af0 \ltrch\fcs0 \f39\fs18\cf1\insrsid9726301\charrsid9726301 
This is long enough and used often enough that you will want to keep it as a subroutine as shown here instead of a macro, at least for the 6502. (The code is only half as long for the 65816.)\~}{\rtlch\fcs1 \af0\afs18 \ltrch\fcs0 
\f39\fs18\cf1\chshdng0\chcfpat0\chcbpat17\insrsid9726301\charrsid9726301 \line \line }{\rtlch\fcs1 \af0 \ltrch\fcs0 \f39\fs18\cf1\insrsid9726301\charrsid9726301 
Above, we gave the example of adding the two top stack cells. Here is some example code of how to do that with the stack:\~}{\rtlch\fcs1 \af0 \ltrch\fcs0 \f39\fs27\cf1\insrsid9726301\charrsid9726301 
\par \ltrrow}\trowd \irow0\irowband0\ltrrow\ts11\trqc\trgaph45\trleft-59\trftsWidth2\trwWidth4500\trautofit1\trspdl7\trspdt7\trspdb7\trspdr7\trspdfl3\trspdft3\trspdfb3\trspdfr3\trpaddl45\trpaddt45\trpaddb45\trpaddr45\trpaddfl3\trpaddft3\trpaddfb3
\trpaddfr3\tblrsid9726301\tbllkhdrrows\tbllkhdrcols\tbllknocolband\tblind0\tblindtype3 \clvertalc\clbrdrt\brdrtbl \clbrdrl\brdrtbl \clbrdrb\brdrtbl \clbrdrr\brdrtbl \cltxlrtb\clftsWidth1\clshdrawnil\clhidemark \cellx8471\pard \ltrpar
\ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\pararsid9726301 {\rtlch\fcs1 \ab\af0 \ltrch\fcs0 \b\f39\fs17\cf1\insrsid9726301\charrsid9726301 Code:}{\rtlch\fcs1 \af0\afs24 \ltrch\fcs0 
\f39\fs24\insrsid9726301\charrsid9726301 \cell }\pard \ltrpar\ql \li0\ri0\sa200\sl276\slmult1\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid9726301\charrsid9726301 
\trowd \irow0\irowband0\ltrrow\ts11\trqc\trgaph45\trleft-59\trftsWidth2\trwWidth4500\trautofit1\trspdl7\trspdt7\trspdb7\trspdr7\trspdfl3\trspdft3\trspdfb3\trspdfr3\trpaddl45\trpaddt45\trpaddb45\trpaddr45\trpaddfl3\trpaddft3\trpaddfb3
\trpaddfr3\tblrsid9726301\tbllkhdrrows\tbllkhdrcols\tbllknocolband\tblind0\tblindtype3 \clvertalc\clbrdrt\brdrtbl \clbrdrl\brdrtbl \clbrdrb\brdrtbl \clbrdrr\brdrtbl \cltxlrtb\clftsWidth1\clshdrawnil\clhidemark \cellx8471\row \ltrrow
}\trowd \irow1\irowband1\lastrow \ltrrow\ts11\trqc\trgaph45\trleft-59\trftsWidth2\trwWidth4500\trautofit1\trspdl7\trspdt7\trspdb7\trspdr7\trspdfl3\trspdft3\trspdfb3\trspdfr3\trpaddl45\trpaddt45\trpaddb45\trpaddr45\trpaddfl3\trpaddft3\trpaddfb3
\trpaddfr3\tblrsid9726301\tbllkhdrrows\tbllkhdrcols\tbllknocolband\tblind0\tblindtype3 \clvertalc\clbrdrt\brdrs\brdrw15\brdrcf22 \clbrdrl\brdrs\brdrw15\brdrcf22 \clbrdrb\brdrs\brdrw15\brdrcf22 \clbrdrr\brdrs\brdrw15\brdrcf22 
\clcbpat21\cltxlrtb\clftsWidth1\clcbpatraw21\clhidemark \cellx8471\pard \ltrpar\ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\pararsid9726301 {\rtlch\fcs1 \af0\afs17 \ltrch\fcs0 
\f5\fs17\cf20\insrsid9726301\charrsid9726301 PLUS:\~ \~CLC}{\rtlch\fcs1 \af0 \ltrch\fcs0 \f5\fs17\cf20\insrsid9726301\charrsid9726301 \~}{\rtlch\fcs1 \af0\afs17 \ltrch\fcs0 \f5\fs17\cf20\insrsid9726301\charrsid9726301 \line \line \~ \~ \~ \~ LDA\~ 0,X\~ 
\~; Start by adding the low bytes}{\rtlch\fcs1 \af0 \ltrch\fcs0 \f5\fs17\cf20\insrsid9726301\charrsid9726301 \~}{\rtlch\fcs1 \af0\afs17 \ltrch\fcs0 \f5\fs17\cf20\insrsid9726301\charrsid9726301 \line \~ \~ \~ \~ ADC\~ 2,X\~ \~; of the two cells,}{
\rtlch\fcs1 \af0 \ltrch\fcs0 \f5\fs17\cf20\insrsid9726301\charrsid9726301 \~}{\rtlch\fcs1 \af0\afs17 \ltrch\fcs0 \f5\fs17\cf20\insrsid9726301\charrsid9726301 \line \~ \~ \~ \~ STA\~ 2,X\~ \~; and put the result in the second cell on the stack,}{
\rtlch\fcs1 \af0 \ltrch\fcs0 \f5\fs17\cf20\insrsid9726301\charrsid9726301 \~}{\rtlch\fcs1 \af0\afs17 \ltrch\fcs0 \f5\fs17\cf20\insrsid9726301\charrsid9726301 \line \~ \~ \~ \~ \~ \~ \~ \~ \~ \~; overwriting what was there before.}{\rtlch\fcs1 \af0 
\ltrch\fcs0 \f5\fs17\cf20\insrsid9726301\charrsid9726301 \~}{\rtlch\fcs1 \af0\afs17 \ltrch\fcs0 \f5\fs17\cf20\insrsid9726301\charrsid9726301 \line \~ \~ \~ \~ LDA\~ 1,X\~ \~; Then do the high bytes similarly.}{\rtlch\fcs1 \af0 \ltrch\fcs0 
\f5\fs17\cf20\insrsid9726301\charrsid9726301 \~}{\rtlch\fcs1 \af0\afs17 \ltrch\fcs0 \f5\fs17\cf20\insrsid9726301\charrsid9726301 \line \~ \~ \~ \~ ADC\~ 3,X}{\rtlch\fcs1 \af0 \ltrch\fcs0 \f5\fs17\cf20\insrsid9726301\charrsid9726301 \~}{\rtlch\fcs1 
\af0\afs17 \ltrch\fcs0 \f5\fs17\cf20\insrsid9726301\charrsid9726301 \line \~ \~ \~ \~ STA\~ 3,X}{\rtlch\fcs1 \af0 \ltrch\fcs0 \f5\fs17\cf20\insrsid9726301\charrsid9726301 \~}{\rtlch\fcs1 \af0\afs17 \ltrch\fcs0 \f5\fs17\cf20\insrsid9726301\charrsid9726301 
\line \line \~ \~ \~ \~ DROP\~ \~ \~ \~; Drop the top cell from the stack.}{\rtlch\fcs1 \af0 \ltrch\fcs0 \f5\fs17\cf20\insrsid9726301\charrsid9726301 \~}{\rtlch\fcs1 \af0\afs17 \ltrch\fcs0 \f5\fs17\cf20\insrsid9726301\charrsid9726301 \line \~ \~ \~ \~ RTS
\~ \~ \~ \~ ; The stack will now have one less cell.}{\rtlch\fcs1 \af0 \ltrch\fcs0 \f5\fs17\cf20\insrsid9726301\charrsid9726301 \~}{\rtlch\fcs1 \af0\afs17 \ltrch\fcs0 \f5\fs17\cf20\insrsid9726301\charrsid9726301 \line \~;--------------\cell }\pard \ltrpar
\ql \li0\ri0\sa200\sl276\slmult1\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid9726301\charrsid9726301 \trowd \irow1\irowband1\lastrow \ltrrow
\ts11\trqc\trgaph45\trleft-59\trftsWidth2\trwWidth4500\trautofit1\trspdl7\trspdt7\trspdb7\trspdr7\trspdfl3\trspdft3\trspdfb3\trspdfr3\trpaddl45\trpaddt45\trpaddb45\trpaddr45\trpaddfl3\trpaddft3\trpaddfb3
\trpaddfr3\tblrsid9726301\tbllkhdrrows\tbllkhdrcols\tbllknocolband\tblind0\tblindtype3 \clvertalc\clbrdrt\brdrs\brdrw15\brdrcf22 \clbrdrl\brdrs\brdrw15\brdrcf22 \clbrdrb\brdrs\brdrw15\brdrcf22 \clbrdrr\brdrs\brdrw15\brdrcf22 
\clcbpat21\cltxlrtb\clftsWidth1\clcbpatraw21\clhidemark \cellx8471\row }\pard \ltrpar\ql \li0\ri0\sa270\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid9726301 {\rtlch\fcs1 \af0\afs18 \ltrch\fcs0 
\f39\fs18\cf1\chshdng0\chcfpat0\chcbpat17\insrsid9726301\charrsid9726301 \line }{\rtlch\fcs1 \af0 \ltrch\fcs0 \f39\fs18\cf1\insrsid9726301\charrsid9726301 
Subtracting now becomes an intuitive variation on the above. There are examples of multiplication and division at\~}{\field\fldedit{\*\fldinst {\rtlch\fcs1 \af0 \ltrch\fcs0 \f39\fs18\cf1\insrsid9726301\charrsid9726301  
HYPERLINK "http://www.6502.org/source" \\t "_blank" }}{\fldrslt {\rtlch\fcs1 \af0 \ltrch\fcs0 \f39\fs18\ul\cf18\insrsid9726301\charrsid9726301 www.6502.org/source}}}\sectd \ltrsect
\linex0\headery708\footery708\colsx708\endnhere\sectlinegrid360\sectdefaultcl\sectrsid15612453\sftnbj {\rtlch\fcs1 \af0 \ltrch\fcs0 \f39\fs18\cf1\insrsid9726301\charrsid9726301 \~. The multiplication routines at\~}{\field\fldedit{\*\fldinst {\rtlch\fcs1 
\af0 \ltrch\fcs0 \f39\fs18\cf1\insrsid9726301\charrsid9726301  HYPERLINK "http://www.6502.org/forum/viewtopic.php?t=689" \\t "_blank" }}{\fldrslt {\rtlch\fcs1 \af0 \ltrch\fcs0 \f39\fs18\ul\cf18\insrsid9726301\charrsid9726301 
www.6502.org/forum/viewtopic.php?t=689}}}\sectd \ltrsect\linex0\headery708\footery708\colsx708\endnhere\sectlinegrid360\sectdefaultcl\sectrsid15612453\sftnbj {\rtlch\fcs1 \af0 \ltrch\fcs0 \f39\fs18\cf1\insrsid9726301\charrsid9726301 \~
multiply two 16-bit cells to arrive at a 32-bit (ie, two-celled) product, and the division routines at\~}{\field\fldedit{\*\fldinst {\rtlch\fcs1 \af0 \ltrch\fcs0 \f39\fs18\cf1\insrsid9726301\charrsid9726301  
HYPERLINK "http://www.6502.org/source/integers/ummodfix/ummodfix.htm" \\t "_blank" }}{\fldrslt {\rtlch\fcs1 \af0 \ltrch\fcs0 \f39\fs18\ul\cf18\insrsid9726301\charrsid9726301 www.6502.org/source/integers/ummodfix/ummodfix.htm}}}\sectd \ltrsect
\linex0\headery708\footery708\colsx708\endnhere\sectlinegrid360\sectdefaultcl\sectrsid15612453\sftnbj {\rtlch\fcs1 \af0 \ltrch\fcs0 \f39\fs18\cf1\insrsid9726301\charrsid9726301 \~start with a 32-bit number and divide by a 16-bit n
umber to get a 16-bit quotient and a 16-bit remainder. These are unsigned, but can be used as building blocks to arrive at the signed counterparts, other precisions, and all the functions we will be discussing. There are more arithmetic source code exampl
es at\~}{\field\fldedit{\*\fldinst {\rtlch\fcs1 \af0 \ltrch\fcs0 \f39\fs18\cf1\insrsid9726301\charrsid9726301  HYPERLINK "http://www.6502.org/source" \\t "_blank" }}{\fldrslt {\rtlch\fcs1 \af0 \ltrch\fcs0 \f39\fs18\ul\cf18\insrsid9726301\charrsid9726301 
www.6502.org/source}}}\sectd \ltrsect\linex0\headery708\footery708\colsx708\endnhere\sectlinegrid360\sectdefaultcl\sectrsid15612453\sftnbj {\rtlch\fcs1 \af0 \ltrch\fcs0 \f39\fs18\cf1\insrsid9726301\charrsid9726301 \~.\~}{\rtlch\fcs1 \af0\afs18 
\ltrch\fcs0 \f39\fs18\cf1\chshdng0\chcfpat0\chcbpat17\insrsid9726301\charrsid9726301 \line \line }{\rtlch\fcs1 \af0 \ltrch\fcs0 \f39\fs18\cf1\insrsid9726301\charrsid9726301 
Further up, Bruce posted the code for NEGATE, which just changes the sign of a two-byte number. (For example, it turns 1487 to -1487, or vice-versa.) To run his routine with the stack, REG and REG+1 as he wrote it would be made to be interpreted by the as
sembler as 0,X and 1,X so we get the same as:\~}{\rtlch\fcs1 \af0 \ltrch\fcs0 \f39\fs27\cf1\insrsid9726301\charrsid9726301 
\par \ltrrow}\trowd \irow0\irowband0\ltrrow\ts11\trqc\trgaph45\trleft-59\trftsWidth2\trwWidth4500\trautofit1\trspdl7\trspdt7\trspdb7\trspdr7\trspdfl3\trspdft3\trspdfb3\trspdfr3\trpaddl45\trpaddt45\trpaddb45\trpaddr45\trpaddfl3\trpaddft3\trpaddfb3
\trpaddfr3\tblrsid9726301\tbllkhdrrows\tbllkhdrcols\tbllknocolband\tblind0\tblindtype3 \clvertalc\clbrdrt\brdrtbl \clbrdrl\brdrtbl \clbrdrb\brdrtbl \clbrdrr\brdrtbl \cltxlrtb\clftsWidth1\clshdrawnil\clhidemark \cellx8471\pard \ltrpar
\ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\pararsid9726301 {\rtlch\fcs1 \ab\af0 \ltrch\fcs0 \b\f39\fs17\cf1\insrsid9726301\charrsid9726301 Code:}{\rtlch\fcs1 \af0\afs24 \ltrch\fcs0 
\f39\fs24\insrsid9726301\charrsid9726301 \cell }\pard \ltrpar\ql \li0\ri0\sa200\sl276\slmult1\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid9726301\charrsid9726301 
\trowd \irow0\irowband0\ltrrow\ts11\trqc\trgaph45\trleft-59\trftsWidth2\trwWidth4500\trautofit1\trspdl7\trspdt7\trspdb7\trspdr7\trspdfl3\trspdft3\trspdfb3\trspdfr3\trpaddl45\trpaddt45\trpaddb45\trpaddr45\trpaddfl3\trpaddft3\trpaddfb3
\trpaddfr3\tblrsid9726301\tbllkhdrrows\tbllkhdrcols\tbllknocolband\tblind0\tblindtype3 \clvertalc\clbrdrt\brdrtbl \clbrdrl\brdrtbl \clbrdrb\brdrtbl \clbrdrr\brdrtbl \cltxlrtb\clftsWidth1\clshdrawnil\clhidemark \cellx8471\row \ltrrow
}\trowd \irow1\irowband1\lastrow \ltrrow\ts11\trqc\trgaph45\trleft-59\trftsWidth2\trwWidth4500\trautofit1\trspdl7\trspdt7\trspdb7\trspdr7\trspdfl3\trspdft3\trspdfb3\trspdfr3\trpaddl45\trpaddt45\trpaddb45\trpaddr45\trpaddfl3\trpaddft3\trpaddfb3
\trpaddfr3\tblrsid9726301\tbllkhdrrows\tbllkhdrcols\tbllknocolband\tblind0\tblindtype3 \clvertalc\clbrdrt\brdrs\brdrw15\brdrcf22 \clbrdrl\brdrs\brdrw15\brdrcf22 \clbrdrb\brdrs\brdrw15\brdrcf22 \clbrdrr\brdrs\brdrw15\brdrcf22 
\clcbpat21\cltxlrtb\clftsWidth1\clcbpatraw21\clhidemark \cellx8471\pard \ltrpar\ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\pararsid9726301 {\rtlch\fcs1 \af0\afs17 \ltrch\fcs0 
\f5\fs17\cf20\insrsid9726301\charrsid9726301 NEGATE: SEC}{\rtlch\fcs1 \af0 \ltrch\fcs0 \f5\fs17\cf20\insrsid9726301\charrsid9726301 \~}{\rtlch\fcs1 \af0\afs17 \ltrch\fcs0 \f5\fs17\cf20\insrsid9726301\charrsid9726301 \line \~ \~ \~ \~ LDA\~ #0\~ \~
 ; Take 0}{\rtlch\fcs1 \af0 \ltrch\fcs0 \f5\fs17\cf20\insrsid9726301\charrsid9726301 \~}{\rtlch\fcs1 \af0\afs17 \ltrch\fcs0 \f5\fs17\cf20\insrsid9726301\charrsid9726301 \line \~ \~ \~ \~ SBC\~ 0,X\~ \~; minus the low byte, and}{\rtlch\fcs1 \af0 
\ltrch\fcs0 \f5\fs17\cf20\insrsid9726301\charrsid9726301 \~}{\rtlch\fcs1 \af0\afs17 \ltrch\fcs0 \f5\fs17\cf20\insrsid9726301\charrsid9726301 \line \~ \~ \~ \~ STA\~ 0,X\~ \~; store the result back to the low byte.}{\rtlch\fcs1 \af0 \ltrch\fcs0 
\f5\fs17\cf20\insrsid9726301\charrsid9726301 \~}{\rtlch\fcs1 \af0\afs17 \ltrch\fcs0 \f5\fs17\cf20\insrsid9726301\charrsid9726301 \line \~ \~ \~ \~ LDA\~ #0\~ \~ ; Then do the same for}{\rtlch\fcs1 \af0 \ltrch\fcs0 
\f5\fs17\cf20\insrsid9726301\charrsid9726301 \~}{\rtlch\fcs1 \af0\afs17 \ltrch\fcs0 \f5\fs17\cf20\insrsid9726301\charrsid9726301 \line \~ \~ \~ \~ SBC\~ 1,X\~ \~; the high byte, using the "borrow"}{\rtlch\fcs1 \af0 \ltrch\fcs0 
\f5\fs17\cf20\insrsid9726301\charrsid9726301 \~}{\rtlch\fcs1 \af0\afs17 \ltrch\fcs0 \f5\fs17\cf20\insrsid9726301\charrsid9726301 \line \~ \~ \~ \~ STA\~ 1,X\~ \~; potentially produced by the first}{\rtlch\fcs1 \af0 \ltrch\fcs0 
\f5\fs17\cf20\insrsid9726301\charrsid9726301 \~}{\rtlch\fcs1 \af0\afs17 \ltrch\fcs0 \f5\fs17\cf20\insrsid9726301\charrsid9726301 \line \~ \~ \~ \~ RTS\~ \~ \~ \~ ; (low byte) operation.}{\rtlch\fcs1 \af0 \ltrch\fcs0 
\f5\fs17\cf20\insrsid9726301\charrsid9726301 \~}{\rtlch\fcs1 \af0\afs17 \ltrch\fcs0 \f5\fs17\cf20\insrsid9726301\charrsid9726301 \line \~;--------------\cell }\pard \ltrpar\ql \li0\ri0\sa200\sl276\slmult1
\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid9726301\charrsid9726301 \trowd \irow1\irowband1\lastrow \ltrrow
\ts11\trqc\trgaph45\trleft-59\trftsWidth2\trwWidth4500\trautofit1\trspdl7\trspdt7\trspdb7\trspdr7\trspdfl3\trspdft3\trspdfb3\trspdfr3\trpaddl45\trpaddt45\trpaddb45\trpaddr45\trpaddfl3\trpaddft3\trpaddfb3
\trpaddfr3\tblrsid9726301\tbllkhdrrows\tbllkhdrcols\tbllknocolband\tblind0\tblindtype3 \clvertalc\clbrdrt\brdrs\brdrw15\brdrcf22 \clbrdrl\brdrs\brdrw15\brdrcf22 \clbrdrb\brdrs\brdrw15\brdrcf22 \clbrdrr\brdrs\brdrw15\brdrcf22 
\clcbpat21\cltxlrtb\clftsWidth1\clcbpatraw21\clhidemark \cellx8471\row }\pard \ltrpar\ql \li0\ri0\sa270\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid9726301 {\rtlch\fcs1 \af0\afs18 \ltrch\fcs0 
\f39\fs18\cf1\chshdng0\chcfpat0\chcbpat17\insrsid9726301\charrsid9726301 \line }{\rtlch\fcs1 \af0 \ltrch\fcs0 \f39\fs18\cf1\insrsid9726301\charrsid9726301 If your assembler can't alias something like REG to an addressing mode and opera
nd as he suggested, just write it as shown here, and you'll get the same thing.\~}{\rtlch\fcs1 \af0\afs18 \ltrch\fcs0 \f39\fs18\cf1\chshdng0\chcfpat0\chcbpat17\insrsid9726301\charrsid9726301 \line \line }{\rtlch\fcs1 \af0 \ltrch\fcs0 
\f39\fs18\cf1\insrsid9726301\charrsid9726301 Now you might be looking ahead a bit and realizing that you may not want to lose the cells that served as inputs for the addition or other process. After all, you might want 
to use that number again, and you don't want to have to store it in a variable to preserve it. Instead of having some routines that discard their inputs when they're done with them and some that don't, it works out better to have them all consume their in
puts and then have other routines that duplicate the cells first if you'll want them again. For example, to duplicate the top cell on the stack, you would do:\~}{\rtlch\fcs1 \af0 \ltrch\fcs0 \f39\fs27\cf1\insrsid9726301\charrsid9726301 
\par \ltrrow}\trowd \irow0\irowband0\ltrrow\ts11\trqc\trgaph45\trleft-59\trftsWidth2\trwWidth4500\trautofit1\trspdl7\trspdt7\trspdb7\trspdr7\trspdfl3\trspdft3\trspdfb3\trspdfr3\trpaddl45\trpaddt45\trpaddb45\trpaddr45\trpaddfl3\trpaddft3\trpaddfb3
\trpaddfr3\tblrsid9726301\tbllkhdrrows\tbllkhdrcols\tbllknocolband\tblind0\tblindtype3 \clvertalc\clbrdrt\brdrtbl \clbrdrl\brdrtbl \clbrdrb\brdrtbl \clbrdrr\brdrtbl \cltxlrtb\clftsWidth1\clshdrawnil\clhidemark \cellx8471\pard \ltrpar
\ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\pararsid9726301 {\rtlch\fcs1 \ab\af0 \ltrch\fcs0 \b\f39\fs17\cf1\insrsid9726301\charrsid9726301 Code:}{\rtlch\fcs1 \af0\afs24 \ltrch\fcs0 
\f39\fs24\insrsid9726301\charrsid9726301 \cell }\pard \ltrpar\ql \li0\ri0\sa200\sl276\slmult1\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid9726301\charrsid9726301 
\trowd \irow0\irowband0\ltrrow\ts11\trqc\trgaph45\trleft-59\trftsWidth2\trwWidth4500\trautofit1\trspdl7\trspdt7\trspdb7\trspdr7\trspdfl3\trspdft3\trspdfb3\trspdfr3\trpaddl45\trpaddt45\trpaddb45\trpaddr45\trpaddfl3\trpaddft3\trpaddfb3
\trpaddfr3\tblrsid9726301\tbllkhdrrows\tbllkhdrcols\tbllknocolband\tblind0\tblindtype3 \clvertalc\clbrdrt\brdrtbl \clbrdrl\brdrtbl \clbrdrb\brdrtbl \clbrdrr\brdrtbl \cltxlrtb\clftsWidth1\clshdrawnil\clhidemark \cellx8471\row \ltrrow
}\trowd \irow1\irowband1\lastrow \ltrrow\ts11\trqc\trgaph45\trleft-59\trftsWidth2\trwWidth4500\trautofit1\trspdl7\trspdt7\trspdb7\trspdr7\trspdfl3\trspdft3\trspdfb3\trspdfr3\trpaddl45\trpaddt45\trpaddb45\trpaddr45\trpaddfl3\trpaddft3\trpaddfb3
\trpaddfr3\tblrsid9726301\tbllkhdrrows\tbllkhdrcols\tbllknocolband\tblind0\tblindtype3 \clvertalc\clbrdrt\brdrs\brdrw15\brdrcf22 \clbrdrl\brdrs\brdrw15\brdrcf22 \clbrdrb\brdrs\brdrw15\brdrcf22 \clbrdrr\brdrs\brdrw15\brdrcf22 
\clcbpat21\cltxlrtb\clftsWidth1\clcbpatraw21\clhidemark \cellx8471\pard \ltrpar\ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\pararsid9726301 {\rtlch\fcs1 \af0\afs17 \ltrch\fcs0 
\f5\fs17\cf20\insrsid9726301\charrsid9726301 DUP:\~ \~ DEX\~ \~ \~ \~ ; Create the new cell at the top.}{\rtlch\fcs1 \af0 \ltrch\fcs0 \f5\fs17\cf20\insrsid9726301\charrsid9726301 \~}{\rtlch\fcs1 \af0\afs17 \ltrch\fcs0 
\f5\fs17\cf20\insrsid9726301\charrsid9726301 \line \~ \~ \~ \~ DEX}{\rtlch\fcs1 \af0 \ltrch\fcs0 \f5\fs17\cf20\insrsid9726301\charrsid9726301 \~}{\rtlch\fcs1 \af0\afs17 \ltrch\fcs0 \f5\fs17\cf20\insrsid9726301\charrsid9726301 \line \~ \~ \~ \~ LDA\~ 2,X\~
 \~; Copy the low byte to the new cell,}{\rtlch\fcs1 \af0 \ltrch\fcs0 \f5\fs17\cf20\insrsid9726301\charrsid9726301 \~}{\rtlch\fcs1 \af0\afs17 \ltrch\fcs0 \f5\fs17\cf20\insrsid9726301\charrsid9726301 \line \~ \~ \~ \~ STA\~ 0,X}{\rtlch\fcs1 \af0 
\ltrch\fcs0 \f5\fs17\cf20\insrsid9726301\charrsid9726301 \~}{\rtlch\fcs1 \af0\afs17 \ltrch\fcs0 \f5\fs17\cf20\insrsid9726301\charrsid9726301 \line \~ \~ \~ \~ LDA\~ 3,X\~ \~; and then the high byte.}{\rtlch\fcs1 \af0 \ltrch\fcs0 
\f5\fs17\cf20\insrsid9726301\charrsid9726301 \~}{\rtlch\fcs1 \af0\afs17 \ltrch\fcs0 \f5\fs17\cf20\insrsid9726301\charrsid9726301 \line \~ \~ \~ \~ STA\~ 1,X}{\rtlch\fcs1 \af0 \ltrch\fcs0 \f5\fs17\cf20\insrsid9726301\charrsid9726301 \~}{\rtlch\fcs1 
\af0\afs17 \ltrch\fcs0 \f5\fs17\cf20\insrsid9726301\charrsid9726301 \line \~ \~ \~ \~ RTS}{\rtlch\fcs1 \af0 \ltrch\fcs0 \f5\fs17\cf20\insrsid9726301\charrsid9726301 \~}{\rtlch\fcs1 \af0\afs17 \ltrch\fcs0 \f5\fs17\cf20\insrsid9726301\charrsid9726301 \line 
\~;--------------\cell }\pard \ltrpar\ql \li0\ri0\sa200\sl276\slmult1\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid9726301\charrsid9726301 
\trowd \irow1\irowband1\lastrow \ltrrow\ts11\trqc\trgaph45\trleft-59\trftsWidth2\trwWidth4500\trautofit1\trspdl7\trspdt7\trspdb7\trspdr7\trspdfl3\trspdft3\trspdfb3\trspdfr3\trpaddl45\trpaddt45\trpaddb45\trpaddr45\trpaddfl3\trpaddft3\trpaddfb3
\trpaddfr3\tblrsid9726301\tbllkhdrrows\tbllkhdrcols\tbllknocolband\tblind0\tblindtype3 \clvertalc\clbrdrt\brdrs\brdrw15\brdrcf22 \clbrdrl\brdrs\brdrw15\brdrcf22 \clbrdrb\brdrs\brdrw15\brdrcf22 \clbrdrr\brdrs\brdrw15\brdrcf22 
\clcbpat21\cltxlrtb\clftsWidth1\clcbpatraw21\clhidemark \cellx8471\row }\pard \ltrpar\ql \li0\ri0\sa270\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid9726301 {\rtlch\fcs1 \af0\afs18 \ltrch\fcs0 
\f39\fs18\cf1\chshdng0\chcfpat0\chcbpat17\insrsid9726301\charrsid9726301 \line }{\rtlch\fcs1 \af0 \ltrch\fcs0 \f39\fs18\cf1\insrsid9726301\charrsid9726301 Here's an example for duplicating the top two cells, preserving the order:\~}{\rtlch\fcs1 \af0 
\ltrch\fcs0 \f39\fs27\cf1\insrsid9726301\charrsid9726301 
\par \ltrrow}\trowd \irow0\irowband0\ltrrow\ts11\trqc\trgaph45\trleft-59\trftsWidth2\trwWidth4500\trautofit1\trspdl7\trspdt7\trspdb7\trspdr7\trspdfl3\trspdft3\trspdfb3\trspdfr3\trpaddl45\trpaddt45\trpaddb45\trpaddr45\trpaddfl3\trpaddft3\trpaddfb3
\trpaddfr3\tblrsid9726301\tbllkhdrrows\tbllkhdrcols\tbllknocolband\tblind0\tblindtype3 \clvertalc\clbrdrt\brdrtbl \clbrdrl\brdrtbl \clbrdrb\brdrtbl \clbrdrr\brdrtbl \cltxlrtb\clftsWidth1\clshdrawnil\clhidemark \cellx8471\pard \ltrpar
\ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\pararsid9726301 {\rtlch\fcs1 \ab\af0 \ltrch\fcs0 \b\f39\fs17\cf1\insrsid9726301\charrsid9726301 Code:}{\rtlch\fcs1 \af0\afs24 \ltrch\fcs0 
\f39\fs24\insrsid9726301\charrsid9726301 \cell }\pard \ltrpar\ql \li0\ri0\sa200\sl276\slmult1\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid9726301\charrsid9726301 
\trowd \irow0\irowband0\ltrrow\ts11\trqc\trgaph45\trleft-59\trftsWidth2\trwWidth4500\trautofit1\trspdl7\trspdt7\trspdb7\trspdr7\trspdfl3\trspdft3\trspdfb3\trspdfr3\trpaddl45\trpaddt45\trpaddb45\trpaddr45\trpaddfl3\trpaddft3\trpaddfb3
\trpaddfr3\tblrsid9726301\tbllkhdrrows\tbllkhdrcols\tbllknocolband\tblind0\tblindtype3 \clvertalc\clbrdrt\brdrtbl \clbrdrl\brdrtbl \clbrdrb\brdrtbl \clbrdrr\brdrtbl \cltxlrtb\clftsWidth1\clshdrawnil\clhidemark \cellx8471\row \ltrrow
}\trowd \irow1\irowband1\lastrow \ltrrow\ts11\trqc\trgaph45\trleft-59\trftsWidth2\trwWidth4500\trautofit1\trspdl7\trspdt7\trspdb7\trspdr7\trspdfl3\trspdft3\trspdfb3\trspdfr3\trpaddl45\trpaddt45\trpaddb45\trpaddr45\trpaddfl3\trpaddft3\trpaddfb3
\trpaddfr3\tblrsid9726301\tbllkhdrrows\tbllkhdrcols\tbllknocolband\tblind0\tblindtype3 \clvertalc\clbrdrt\brdrs\brdrw15\brdrcf22 \clbrdrl\brdrs\brdrw15\brdrcf22 \clbrdrb\brdrs\brdrw15\brdrcf22 \clbrdrr\brdrs\brdrw15\brdrcf22 
\clcbpat21\cltxlrtb\clftsWidth1\clcbpatraw21\clhidemark \cellx8471\pard \ltrpar\ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\pararsid9726301 {\rtlch\fcs1 \af0\afs17 \ltrch\fcs0 
\f5\fs17\cf20\insrsid9726301\charrsid9726301 _2DUP:\~ DEX\~ \~ \~ \~ ; Create two new cells at the top.}{\rtlch\fcs1 \af0 \ltrch\fcs0 \f5\fs17\cf20\insrsid9726301\charrsid9726301 \~}{\rtlch\fcs1 \af0\afs17 \ltrch\fcs0 
\f5\fs17\cf20\insrsid9726301\charrsid9726301 \line \~ \~ \~ \~ DEX}{\rtlch\fcs1 \af0 \ltrch\fcs0 \f5\fs17\cf20\insrsid9726301\charrsid9726301 \~}{\rtlch\fcs1 \af0\afs17 \ltrch\fcs0 \f5\fs17\cf20\insrsid9726301\charrsid9726301 \line \~ \~ \~ \~ DEX}{
\rtlch\fcs1 \af0 \ltrch\fcs0 \f5\fs17\cf20\insrsid9726301\charrsid9726301 \~}{\rtlch\fcs1 \af0\afs17 \ltrch\fcs0 \f5\fs17\cf20\insrsid9726301\charrsid9726301 \line \~ \~ \~ \~ DEX}{\rtlch\fcs1 \af0 \ltrch\fcs0 \f5\fs17\cf20\insrsid9726301\charrsid9726301 
\~}{\rtlch\fcs1 \af0\afs17 \ltrch\fcs0 \f5\fs17\cf20\insrsid9726301\charrsid9726301 \line \line \~ \~ \~ \~ LDA\~ 6,X\~ \~; Then copy the contents over.}{\rtlch\fcs1 \af0 \ltrch\fcs0 \f5\fs17\cf20\insrsid9726301\charrsid9726301 \~}{\rtlch\fcs1 \af0\afs17 
\ltrch\fcs0 \f5\fs17\cf20\insrsid9726301\charrsid9726301 \line \~ \~ \~ \~ STA\~ 2,X}{\rtlch\fcs1 \af0 \ltrch\fcs0 \f5\fs17\cf20\insrsid9726301\charrsid9726301 \~}{\rtlch\fcs1 \af0\afs17 \ltrch\fcs0 \f5\fs17\cf20\insrsid9726301\charrsid9726301 \line \~ \~
 \~ \~ LDA\~ 7,X}{\rtlch\fcs1 \af0 \ltrch\fcs0 \f5\fs17\cf20\insrsid9726301\charrsid9726301 \~}{\rtlch\fcs1 \af0\afs17 \ltrch\fcs0 \f5\fs17\cf20\insrsid9726301\charrsid9726301 \line \~ \~ \~ \~ STA\~ 3,X}{\rtlch\fcs1 \af0 \ltrch\fcs0 
\f5\fs17\cf20\insrsid9726301\charrsid9726301 \~}{\rtlch\fcs1 \af0\afs17 \ltrch\fcs0 \f5\fs17\cf20\insrsid9726301\charrsid9726301 \line \~ \~ \~ \~ LDA\~ 4,X}{\rtlch\fcs1 \af0 \ltrch\fcs0 \f5\fs17\cf20\insrsid9726301\charrsid9726301 \~}{\rtlch\fcs1 
\af0\afs17 \ltrch\fcs0 \f5\fs17\cf20\insrsid9726301\charrsid9726301 \line \~ \~ \~ \~ STA\~ 0,X}{\rtlch\fcs1 \af0 \ltrch\fcs0 \f5\fs17\cf20\insrsid9726301\charrsid9726301 \~}{\rtlch\fcs1 \af0\afs17 \ltrch\fcs0 \f5\fs17\cf20\insrsid9726301\charrsid9726301 
\line \~ \~ \~ \~ LDA\~ 5,X}{\rtlch\fcs1 \af0 \ltrch\fcs0 \f5\fs17\cf20\insrsid9726301\charrsid9726301 \~}{\rtlch\fcs1 \af0\afs17 \ltrch\fcs0 \f5\fs17\cf20\insrsid9726301\charrsid9726301 \line \~ \~ \~ \~ STA\~ 1,X}{\rtlch\fcs1 \af0 \ltrch\fcs0 
\f5\fs17\cf20\insrsid9726301\charrsid9726301 \~}{\rtlch\fcs1 \af0\afs17 \ltrch\fcs0 \f5\fs17\cf20\insrsid9726301\charrsid9726301 \line \line \~ \~ \~ \~ RTS}{\rtlch\fcs1 \af0 \ltrch\fcs0 \f5\fs17\cf20\insrsid9726301\charrsid9726301 \~}{\rtlch\fcs1 
\af0\afs17 \ltrch\fcs0 \f5\fs17\cf20\insrsid9726301\charrsid9726301 \line \~;--------------\cell }\pard \ltrpar\ql \li0\ri0\sa200\sl276\slmult1\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 
\f0\fs20\insrsid9726301\charrsid9726301 \trowd \irow1\irowband1\lastrow \ltrrow
\ts11\trqc\trgaph45\trleft-59\trftsWidth2\trwWidth4500\trautofit1\trspdl7\trspdt7\trspdb7\trspdr7\trspdfl3\trspdft3\trspdfb3\trspdfr3\trpaddl45\trpaddt45\trpaddb45\trpaddr45\trpaddfl3\trpaddft3\trpaddfb3
\trpaddfr3\tblrsid9726301\tbllkhdrrows\tbllkhdrcols\tbllknocolband\tblind0\tblindtype3 \clvertalc\clbrdrt\brdrs\brdrw15\brdrcf22 \clbrdrl\brdrs\brdrw15\brdrcf22 \clbrdrb\brdrs\brdrw15\brdrcf22 \clbrdrr\brdrs\brdrw15\brdrcf22 
\clcbpat21\cltxlrtb\clftsWidth1\clcbpatraw21\clhidemark \cellx8471\row }\pard \ltrpar\ql \li0\ri0\sa270\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid9726301 {\rtlch\fcs1 \af0\afs18 \ltrch\fcs0 
\f39\fs18\cf1\chshdng0\chcfpat0\chcbpat17\insrsid9726301\charrsid9726301 \line }{\rtlch\fcs1 \af0 \ltrch\fcs0 \f39\fs18\cf1\insrsid9726301\charrsid9726301 
It also makes for a smaller kernel and fewer errors if we treat all cells as two bytes (or at least the same number of bytes every time, even if it's not two), instead of trying to economize and have single-byte cells and the combinations of operators and
 so on that would be necessary for all the various precisions of interest. If a particular number will always fit in 8 bits or less, just zero the high byte of the cell.\~}{\rtlch\fcs1 \af0\afs18 \ltrch\fcs0 
\f39\fs18\cf1\chshdng0\chcfpat0\chcbpat17\insrsid9726301\charrsid9726301 \line \line \line \line }{\rtlch\fcs1 \af0 \ltrch\fcs0 \f39\fs18\cf1\insrsid9726301\charrsid9726301 
We can introduce more stack-manipulation subroutines as they become necessary. Fortunately this trail has already been blazed, so we don't have to re-invent things and wonder if we're painting ourselves into a corner.\~}{\rtlch\fcs1 \af0\afs18 
\ltrch\fcs0 \f39\fs18\cf1\chshdng0\chcfpat0\chcbpat17\insrsid9726301\charrsid9726301 \line \line }{\rtlch\fcs1 \af0 \ltrch\fcs0 \f39\fs18\cf1\insrsid9726301\charrsid9726301 
In someone's musings (name witheld to protect the guilty) on language implementations on the 6502, he says that errors 
in stack manipulation are a serious problem in Forth. This shows his inexperience with it. Yes, a person who is new to Forth will crash it frequently; but that quickly ends with a little experience to get the hang of it.\~}{\rtlch\fcs1 \af0\afs18 
\ltrch\fcs0 \f39\fs18\cf1\chshdng0\chcfpat0\chcbpat17\insrsid9726301\charrsid9726301 \line \line }{\rtlch\fcs1 \af0 \ltrch\fcs0 \f39\fs18\cf1\insrsid9726301\charrsid9726301 ========================\~}{\rtlch\fcs1 \af0 \ltrch\fcs0 
\f39\fs27\cf1\insrsid9726301\charrsid9726301 
\par \ltrrow}\trowd \irow0\irowband0\ltrrow\ts11\trqc\trgaph45\trleft-59\trftsWidth2\trwWidth4500\trautofit1\trspdl7\trspdt7\trspdb7\trspdr7\trspdfl3\trspdft3\trspdfb3\trspdfr3\trpaddl45\trpaddt45\trpaddb45\trpaddr45\trpaddfl3\trpaddft3\trpaddfb3
\trpaddfr3\tblrsid9726301\tbllkhdrrows\tbllkhdrcols\tbllknocolband\tblind0\tblindtype3 \clvertalc\clbrdrt\brdrtbl \clbrdrl\brdrtbl \clbrdrb\brdrtbl \clbrdrr\brdrtbl \cltxlrtb\clftsWidth1\clshdrawnil\clhidemark \cellx8471\pard \ltrpar
\ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\pararsid9726301 {\rtlch\fcs1 \ab\af0 \ltrch\fcs0 \b\f39\fs17\cf1\insrsid9726301\charrsid9726301 Quote:}{\rtlch\fcs1 \af0\afs24 \ltrch\fcs0 
\f39\fs24\insrsid9726301\charrsid9726301 \cell }\pard \ltrpar\ql \li0\ri0\sa200\sl276\slmult1\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid9726301\charrsid9726301 
\trowd \irow0\irowband0\ltrrow\ts11\trqc\trgaph45\trleft-59\trftsWidth2\trwWidth4500\trautofit1\trspdl7\trspdt7\trspdb7\trspdr7\trspdfl3\trspdft3\trspdfb3\trspdfr3\trpaddl45\trpaddt45\trpaddb45\trpaddr45\trpaddfl3\trpaddft3\trpaddfb3
\trpaddfr3\tblrsid9726301\tbllkhdrrows\tbllkhdrcols\tbllknocolband\tblind0\tblindtype3 \clvertalc\clbrdrt\brdrtbl \clbrdrl\brdrtbl \clbrdrb\brdrtbl \clbrdrr\brdrtbl \cltxlrtb\clftsWidth1\clshdrawnil\clhidemark \cellx8471\row \ltrrow
}\trowd \irow1\irowband1\lastrow \ltrrow\ts11\trqc\trgaph45\trleft-59\trftsWidth2\trwWidth4500\trautofit1\trspdl7\trspdt7\trspdb7\trspdr7\trspdfl3\trspdft3\trspdfb3\trspdfr3\trpaddl45\trpaddt45\trpaddb45\trpaddr45\trpaddfl3\trpaddft3\trpaddfb3
\trpaddfr3\tblrsid9726301\tbllkhdrrows\tbllkhdrcols\tbllknocolband\tblind0\tblindtype3 \clvertalc\clbrdrt\brdrs\brdrw15\brdrcf22 \clbrdrl\brdrs\brdrw15\brdrcf22 \clbrdrb\brdrs\brdrw15\brdrcf22 \clbrdrr\brdrs\brdrw15\brdrcf22 
\clcbpat21\cltxlrtb\clftsWidth1\clcbpatraw21\clhidemark \cellx8471\pard \ltrpar\ql \li0\ri0\sl210\slmult0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\pararsid9726301 {\rtlch\fcs1 \af0\afs17 \ltrch\fcs0 
\f39\fs17\cf23\insrsid9726301\charrsid9726301 \line GARTHWILSON wrote:
\par }\pard \ltrpar\ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap2\pararsid9726301 {\rtlch\fcs1 \ab\af0 \ltrch\fcs0 \b\f39\fs17\cf1\insrsid9726301\charrsid9726301 Quote:}{\rtlch\fcs1 \af0\afs24 \ltrch\fcs0 
\f39\fs24\insrsid9726301\charrsid9726301 \nestcell{\nonesttables
\par }}\pard \ltrpar\ql \li0\ri0\sa200\sl276\slmult1\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap2 {\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid9726301\charrsid9726301 {\*\nesttableprops\trowd \irow0\irowband0\ltrrow
\ts11\trqc\trgaph45\trleft0\trftsWidth2\trwWidth4500\trautofit1\trspdl7\trspdt7\trspdb7\trspdr7\trspdfl3\trspdft3\trspdfb3\trspdfr3\trpaddl45\trpaddt45\trpaddb45\trpaddr45\trpaddfl3\trpaddft3\trpaddfb3
\trpaddfr3\tbllkhdrrows\tbllkhdrcols\tbllknocolband\tblind0\tblindtype3 \clvertalc\clbrdrt\brdrtbl \clbrdrl\brdrtbl \clbrdrb\brdrtbl \clbrdrr\brdrtbl \cltxlrtb\clftsWidth1\clshdrawnil\clhidemark \cellx7544\nestrow}{\nonesttables
\par }}\pard \ltrpar\ql \li0\ri0\sl210\slmult0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap2\pararsid9726301 {\rtlch\fcs1 \af0\afs17 \ltrch\fcs0 \f39\fs17\cf23\insrsid9726301\charrsid9726301 \line 
We'll need a good title to grab the attention of the person who thinks there's no way scaled-integer could be adequate for his application just because it's not floating-point.\nestcell{\nonesttables
\par }}\pard \ltrpar\ql \li0\ri0\sa200\sl276\slmult1\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap2 {\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid9726301\charrsid9726301 {\*\nesttableprops
\trowd \irow1\irowband1\lastrow \ltrrow\ts11\trqc\trgaph45\trleft0\trftsWidth2\trwWidth4500\trautofit1\trspdl7\trspdt7\trspdb7\trspdr7\trspdfl3\trspdft3\trspdfb3\trspdfr3\trpaddl45\trpaddt45\trpaddb45\trpaddr45\trpaddfl3\trpaddft3\trpaddfb3
\trpaddfr3\tbllkhdrrows\tbllkhdrcols\tbllknocolband\tblind0\tblindtype3 \clvertalc\clbrdrt\brdrs\brdrw15\brdrcf22 \clbrdrl\brdrs\brdrw15\brdrcf22 \clbrdrb\brdrs\brdrw15\brdrcf22 \clbrdrr\brdrs\brdrw15\brdrcf22 
\clcbpat21\cltxlrtb\clftsWidth1\clcbpatraw21\clhidemark \cellx7544\nestrow}{\nonesttables
\par }\ltrrow}\trowd \irow1\irowband1\lastrow \ltrrow\ts11\trqc\trgaph45\trleft-59\trftsWidth2\trwWidth4500\trautofit1\trspdl7\trspdt7\trspdb7\trspdr7\trspdfl3\trspdft3\trspdfb3\trspdfr3\trpaddl45\trpaddt45\trpaddb45\trpaddr45\trpaddfl3\trpaddft3\trpaddfb3
\trpaddfr3\tblrsid9726301\tbllkhdrrows\tbllkhdrcols\tbllknocolband\tblind0\tblindtype3 \clvertalc\clbrdrt\brdrs\brdrw15\brdrcf22 \clbrdrl\brdrs\brdrw15\brdrcf22 \clbrdrb\brdrs\brdrw15\brdrcf22 \clbrdrr\brdrs\brdrw15\brdrcf22 
\clcbpat21\cltxlrtb\clftsWidth1\clcbpatraw21\clhidemark \cellx8471\pard \ltrpar\ql \li0\ri0\sl210\slmult0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\pararsid9726301 {\rtlch\fcs1 \af0\afs18 \ltrch\fcs0 
\f39\fs18\cf23\insrsid9726301\charrsid9726301 \line \line }{\rtlch\fcs1 \af0 \ltrch\fcs0 \f39\fs18\cf23\insrsid9726301\charrsid9726301 Here are a couple of suggestions off the top of my head:\~}{\rtlch\fcs1 \af0\afs18 \ltrch\fcs0 
\f39\fs18\cf23\insrsid9726301\charrsid9726301 \line \line }{\rtlch\fcs1 \af0 \ltrch\fcs0 \f39\fs18\cf23\insrsid9726301\charrsid9726301 Beyond integers\~}{\rtlch\fcs1 \af0\afs18 \ltrch\fcs0 \f39\fs18\cf23\insrsid9726301\charrsid9726301 \line }{\rtlch\fcs1 
\af0 \ltrch\fcs0 \f39\fs18\cf23\insrsid9726301\charrsid9726301 Practical math with real numbers\~}{\rtlch\fcs1 \af0\afs18 \ltrch\fcs0 \f39\fs18\cf23\insrsid9726301\charrsid9726301 \line \line }{\rtlch\fcs1 \af0 \ltrch\fcs0 
\f39\fs18\cf23\insrsid9726301\charrsid9726301 I was going for something that would emphasize the advantages of scaled-integer, rather than bash floating-point.}{\rtlch\fcs1 \af0\afs17 \ltrch\fcs0 \f39\fs17\cf23\insrsid9726301\charrsid9726301 \cell 
}\pard \ltrpar\ql \li0\ri0\sa200\sl276\slmult1\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid9726301\charrsid9726301 \trowd \irow1\irowband1\lastrow \ltrrow
\ts11\trqc\trgaph45\trleft-59\trftsWidth2\trwWidth4500\trautofit1\trspdl7\trspdt7\trspdb7\trspdr7\trspdfl3\trspdft3\trspdfb3\trspdfr3\trpaddl45\trpaddt45\trpaddb45\trpaddr45\trpaddfl3\trpaddft3\trpaddfb3
\trpaddfr3\tblrsid9726301\tbllkhdrrows\tbllkhdrcols\tbllknocolband\tblind0\tblindtype3 \clvertalc\clbrdrt\brdrs\brdrw15\brdrcf22 \clbrdrl\brdrs\brdrw15\brdrcf22 \clbrdrb\brdrs\brdrw15\brdrcf22 \clbrdrr\brdrs\brdrw15\brdrcf22 
\clcbpat21\cltxlrtb\clftsWidth1\clcbpatraw21\clhidemark \cellx8471\row }\pard \ltrpar\ql \li0\ri0\sa200\sl276\slmult1\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 {\rtlch\fcs1 \af0\afs18 \ltrch\fcs0 
\f39\fs18\cf1\chshdng0\chcfpat0\chcbpat17\insrsid9726301\charrsid9726301 \line }{\rtlch\fcs1 \af0 \ltrch\fcs0 \f39\fs18\cf1\insrsid9726301\charrsid9726301 
I see your point. "Real" however could still be floating-point, and rules out complex numbers (which I do hope to address). "Beyond Integers" may be on the right track but just need a little expansion to stir one's interest.}{\rtlch\fcs1 \af31507 
\ltrch\fcs0 \insrsid15612453 
\par }{\*\themedata 504b030414000600080000002100828abc13fa0000001c020000130000005b436f6e74656e745f54797065735d2e786d6cac91cb6ac3301045f785fe83d0b6d8
72ba28a5d8cea249777d2cd20f18e4b12d6a8f843409c9df77ecb850ba082d74231062ce997b55ae8fe3a00e1893f354e9555e6885647de3a8abf4fbee29bbd7
2a3150038327acf409935ed7d757e5ee14302999a654e99e393c18936c8f23a4dc072479697d1c81e51a3b13c07e4087e6b628ee8cf5c4489cf1c4d075f92a0b
44d7a07a83c82f308ac7b0a0f0fbf90c2480980b58abc733615aa2d210c2e02cb04430076a7ee833dfb6ce62e3ed7e14693e8317d8cd0433bf5c60f53fea2fe7
065bd80facb647e9e25c7fc421fd2ddb526b2e9373fed4bb902e182e97b7b461e6bfad3f010000ffff0300504b030414000600080000002100a5d6a7e7c00000
00360100000b0000005f72656c732f2e72656c73848fcf6ac3300c87ef85bd83d17d51d2c31825762fa590432fa37d00e1287f68221bdb1bebdb4fc7060abb08
84a4eff7a93dfeae8bf9e194e720169aaa06c3e2433fcb68e1763dbf7f82c985a4a725085b787086a37bdbb55fbc50d1a33ccd311ba548b63095120f88d94fbc
52ae4264d1c910d24a45db3462247fa791715fd71f989e19e0364cd3f51652d73760ae8fa8c9ffb3c330cc9e4fc17faf2ce545046e37944c69e462a1a82fe353
bd90a865aad41ed0b5b8f9d6fd010000ffff0300504b0304140006000800000021006b799616830000008a0000001c0000007468656d652f7468656d652f7468
656d654d616e616765722e786d6c0ccc4d0ac3201040e17da17790d93763bb284562b2cbaebbf600439c1a41c7a0d29fdbd7e5e38337cedf14d59b4b0d592c9c
070d8a65cd2e88b7f07c2ca71ba8da481cc52c6ce1c715e6e97818c9b48d13df49c873517d23d59085adb5dd20d6b52bd521ef2cdd5eb9246a3d8b4757e8d3f7
29e245eb2b260a0238fd010000ffff0300504b03041400060008000000210096b5ade296060000501b0000160000007468656d652f7468656d652f7468656d65
312e786d6cec594f6fdb3614bf0fd87720746f6327761a07758ad8b19b2d4d1bc46e871e698996d850a240d2497d1bdae38001c3ba618715d86d87615b8116d8
a5fb34d93a6c1dd0afb0475292c5585e9236d88aad3e2412f9e3fbff1e1fa9abd7eec70c1d1221294fda5efd72cd4324f1794093b0eddd1ef62fad79482a9c04
98f184b4bd2991deb58df7dfbb8ad755446282607d22d771db8b944ad79796a40fc3585ee62949606ecc458c15bc8a702910f808e8c66c69b9565b5d8a314d3c
94e018c8de1a8fa94fd05093f43672e23d06af89927ac06762a049136785c10607758d9053d965021d62d6f6804fc08f86e4bef210c352c144dbab999fb7b471
7509af678b985ab0b6b4ae6f7ed9ba6c4170b06c788a705430adf71bad2b5b057d03606a1ed7ebf5babd7a41cf00b0ef83a6569632cd467faddec9699640f671
9e76b7d6ac355c7c89feca9cccad4ea7d36c65b258a206641f1b73f8b5da6a6373d9c11b90c537e7f08dce66b7bbeae00dc8e257e7f0fd2badd5868b37a088d1
e4600ead1ddaef67d40bc898b3ed4af81ac0d76a197c86826828a24bb318f3442d8ab518dfe3a20f000d6458d104a9694ac6d88728eee2782428d60cf03ac1a5
193be4cbb921cd0b495fd054b5bd0f530c1931a3f7eaf9f7af9e3f45c70f9e1d3ff8e9f8e1c3e3073f5a42ceaa6d9c84e5552fbffdeccfc71fa33f9e7ef3f2d1
17d57859c6fffac327bffcfc793510d26726ce8b2f9ffcf6ecc98baf3efdfdbb4715f04d814765f890c644a29be408edf3181433567125272371be15c308d3f2
8acd249438c19a4b05fd9e8a1cf4cd296699771c393ac4b5e01d01e5a30a787d72cf1178108989a2159c77a2d801ee72ce3a5c545a6147f32a99793849c26ae6
6252c6ed637c58c5bb8b13c7bfbd490a75330f4b47f16e441c31f7184e140e494214d273fc80900aedee52ead87597fa824b3e56e82e451d4c2b4d32a423279a
668bb6690c7e9956e90cfe766cb37b077538abd27a8b1cba48c80acc2a841f12e698f13a9e281c57911ce298950d7e03aba84ac8c154f8655c4f2af074481847
bd804859b5e696007d4b4edfc150b12addbecba6b18b148a1e54d1bc81392f23b7f84137c2715a851dd0242a633f900710a218ed715505dfe56e86e877f0034e
16bafb0e258ebb4faf06b769e888340b103d3311da9750aa9d0a1cd3e4efca31a3508f6d0c5c5c398602f8e2ebc71591f5b616e24dd893aa3261fb44f95d843b
5974bb5c04f4edafb95b7892ec1108f3f98de75dc97d5772bdff7cc95d94cf672db4b3da0a6557f70db629362d72bcb0431e53c6066acac80d699a6409fb44d0
8741bdce9c0e4971624a2378cceaba830b05366b90e0ea23aaa241845368b0eb9e2612ca8c742851ca251ceccc70256d8d87265dd96361531f186c3d9058edf2
c00eafe8e1fc5c509031bb4d680e9f39a3154de0accc56ae644441edd76156d7429d995bdd88664a9dc3ad50197c38af1a0c16d684060441db02565e85f3b966
0d0713cc48a0ed6ef7dedc2dc60b17e92219e180643ed27acffba86e9c94c78ab90980d8a9f0913ee49d62b512b79626fb06dccee2a432bbc60276b9f7dec44b
7904cfbca4f3f6443ab2a49c9c2c41476dafd55c6e7ac8c769db1bc399161ee314bc2e75cf8759081743be1236ec4f4d6693e5336fb672c5dc24a8c33585b5fb
9cc24e1d4885545b58463634cc5416022cd19cacfccb4d30eb45296023fd35a458598360f8d7a4003bbaae25e331f155d9d9a5116d3bfb9a95523e51440ca2e0
088dd844ec6370bf0e55d027a012ae264c45d02f708fa6ad6da6dce29c255df9f6cae0ec38666984b372ab5334cf640b37795cc860de4ae2816e95b21be5ceaf
8a49f90b52a51cc6ff3355f47e0237052b81f6800fd7b802239daf6d8f0b1571a8426944fdbe80c6c1d40e8816b88b8569082ab84c36ff0539d4ff6dce591a26
ade1c0a7f669880485fd484582903d284b26fa4e2156cff62e4b9265844c4495c495a9157b440e091bea1ab8aaf7760f4510eaa69a6465c0e04ec69ffb9e65d0
28d44d4e39df9c1a52ecbd3607fee9cec7263328e5d661d3d0e4f62f44acd855ed7ab33cdf7bcb8ae889599bd5c8b3029895b6825696f6af29c239b75a5bb1e6
345e6ee6c28117e73586c1a2214ae1be07e93fb0ff51e133fb65426fa843be0fb515c187064d0cc206a2fa926d3c902e907670048d931db4c1a44959d366ad93
b65abe595f70a75bf03d616c2dd959fc7d4e6317cd99cbcec9c58b34766661c7d6766ca1a9c1b327531486c6f941c638c67cd22a7f75e2a37be0e82db8df9f30
254d30c1372581a1f51c983c80e4b71ccdd28dbf000000ffff0300504b0304140006000800000021000dd1909fb60000001b010000270000007468656d652f74
68656d652f5f72656c732f7468656d654d616e616765722e786d6c2e72656c73848f4d0ac2301484f78277086f6fd3ba109126dd88d0add40384e4350d363f24
51eced0dae2c082e8761be9969bb979dc9136332de3168aa1a083ae995719ac16db8ec8e4052164e89d93b64b060828e6f37ed1567914b284d262452282e3198
720e274a939cd08a54f980ae38a38f56e422a3a641c8bbd048f7757da0f19b017cc524bd62107bd5001996509affb3fd381a89672f1f165dfe514173d9850528
a2c6cce0239baa4c04ca5bbabac4df000000ffff0300504b01022d0014000600080000002100828abc13fa0000001c0200001300000000000000000000000000
000000005b436f6e74656e745f54797065735d2e786d6c504b01022d0014000600080000002100a5d6a7e7c0000000360100000b000000000000000000000000
002b0100005f72656c732f2e72656c73504b01022d00140006000800000021006b799616830000008a0000001c00000000000000000000000000140200007468
656d652f7468656d652f7468656d654d616e616765722e786d6c504b01022d001400060008000000210096b5ade296060000501b000016000000000000000000
00000000d10200007468656d652f7468656d652f7468656d65312e786d6c504b01022d00140006000800000021000dd1909fb60000001b010000270000000000
00000000000000009b0900007468656d652f7468656d652f5f72656c732f7468656d654d616e616765722e786d6c2e72656c73504b050600000000050005005d010000960a00000000}
{\*\colorschememapping 3c3f786d6c2076657273696f6e3d22312e302220656e636f64696e673d225554462d3822207374616e64616c6f6e653d22796573223f3e0d0a3c613a636c724d
617020786d6c6e733a613d22687474703a2f2f736368656d61732e6f70656e786d6c666f726d6174732e6f72672f64726177696e676d6c2f323030362f6d6169
6e22206267313d226c743122207478313d22646b3122206267323d226c743222207478323d22646b322220616363656e74313d22616363656e74312220616363
656e74323d22616363656e74322220616363656e74333d22616363656e74332220616363656e74343d22616363656e74342220616363656e74353d22616363656e74352220616363656e74363d22616363656e74362220686c696e6b3d22686c696e6b2220666f6c486c696e6b3d22666f6c486c696e6b222f3e}
{\*\latentstyles\lsdstimax267\lsdlockeddef0\lsdsemihiddendef1\lsdunhideuseddef1\lsdqformatdef0\lsdprioritydef99{\lsdlockedexcept \lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority0 \lsdlocked0 Normal;
\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 1;\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 2;\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 3;\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 4;
\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 5;\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 6;\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 7;\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 8;\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 9;
\lsdpriority39 \lsdlocked0 toc 1;\lsdpriority39 \lsdlocked0 toc 2;\lsdpriority39 \lsdlocked0 toc 3;\lsdpriority39 \lsdlocked0 toc 4;\lsdpriority39 \lsdlocked0 toc 5;\lsdpriority39 \lsdlocked0 toc 6;\lsdpriority39 \lsdlocked0 toc 7;
\lsdpriority39 \lsdlocked0 toc 8;\lsdpriority39 \lsdlocked0 toc 9;\lsdqformat1 \lsdpriority35 \lsdlocked0 caption;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority10 \lsdlocked0 Title;\lsdpriority1 \lsdlocked0 Default Paragraph Font;
\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority11 \lsdlocked0 Subtitle;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority22 \lsdlocked0 Strong;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority20 \lsdlocked0 Emphasis;
\lsdsemihidden0 \lsdunhideused0 \lsdpriority59 \lsdlocked0 Table Grid;\lsdunhideused0 \lsdlocked0 Placeholder Text;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority1 \lsdlocked0 No Spacing;
\lsdsemihidden0 \lsdunhideused0 \lsdpriority60 \lsdlocked0 Light Shading;\lsdsemihidden0 \lsdunhideused0 \lsdpriority61 \lsdlocked0 Light List;\lsdsemihidden0 \lsdunhideused0 \lsdpriority62 \lsdlocked0 Light Grid;
\lsdsemihidden0 \lsdunhideused0 \lsdpriority63 \lsdlocked0 Medium Shading 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority64 \lsdlocked0 Medium Shading 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority65 \lsdlocked0 Medium List 1;
\lsdsemihidden0 \lsdunhideused0 \lsdpriority66 \lsdlocked0 Medium List 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority67 \lsdlocked0 Medium Grid 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority68 \lsdlocked0 Medium Grid 2;
\lsdsemihidden0 \lsdunhideused0 \lsdpriority69 \lsdlocked0 Medium Grid 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority70 \lsdlocked0 Dark List;\lsdsemihidden0 \lsdunhideused0 \lsdpriority71 \lsdlocked0 Colorful Shading;
\lsdsemihidden0 \lsdunhideused0 \lsdpriority72 \lsdlocked0 Colorful List;\lsdsemihidden0 \lsdunhideused0 \lsdpriority73 \lsdlocked0 Colorful Grid;\lsdsemihidden0 \lsdunhideused0 \lsdpriority60 \lsdlocked0 Light Shading Accent 1;
\lsdsemihidden0 \lsdunhideused0 \lsdpriority61 \lsdlocked0 Light List Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority62 \lsdlocked0 Light Grid Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 1;
\lsdsemihidden0 \lsdunhideused0 \lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority65 \lsdlocked0 Medium List 1 Accent 1;\lsdunhideused0 \lsdlocked0 Revision;
\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority34 \lsdlocked0 List Paragraph;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority29 \lsdlocked0 Quote;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority30 \lsdlocked0 Intense Quote;
\lsdsemihidden0 \lsdunhideused0 \lsdpriority66 \lsdlocked0 Medium List 2 Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 1;
\lsdsemihidden0 \lsdunhideused0 \lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority70 \lsdlocked0 Dark List Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority71 \lsdlocked0 Colorful Shading Accent 1;
\lsdsemihidden0 \lsdunhideused0 \lsdpriority72 \lsdlocked0 Colorful List Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority73 \lsdlocked0 Colorful Grid Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority60 \lsdlocked0 Light Shading Accent 2;
\lsdsemihidden0 \lsdunhideused0 \lsdpriority61 \lsdlocked0 Light List Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority62 \lsdlocked0 Light Grid Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 2;
\lsdsemihidden0 \lsdunhideused0 \lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority65 \lsdlocked0 Medium List 1 Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority66 \lsdlocked0 Medium List 2 Accent 2;
\lsdsemihidden0 \lsdunhideused0 \lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 2;
\lsdsemihidden0 \lsdunhideused0 \lsdpriority70 \lsdlocked0 Dark List Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority71 \lsdlocked0 Colorful Shading Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority72 \lsdlocked0 Colorful List Accent 2;
\lsdsemihidden0 \lsdunhideused0 \lsdpriority73 \lsdlocked0 Colorful Grid Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority60 \lsdlocked0 Light Shading Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority61 \lsdlocked0 Light List Accent 3;
\lsdsemihidden0 \lsdunhideused0 \lsdpriority62 \lsdlocked0 Light Grid Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 3;
\lsdsemihidden0 \lsdunhideused0 \lsdpriority65 \lsdlocked0 Medium List 1 Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority66 \lsdlocked0 Medium List 2 Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 3;
\lsdsemihidden0 \lsdunhideused0 \lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority70 \lsdlocked0 Dark List Accent 3;
\lsdsemihidden0 \lsdunhideused0 \lsdpriority71 \lsdlocked0 Colorful Shading Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority72 \lsdlocked0 Colorful List Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority73 \lsdlocked0 Colorful Grid Accent 3;
\lsdsemihidden0 \lsdunhideused0 \lsdpriority60 \lsdlocked0 Light Shading Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority61 \lsdlocked0 Light List Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority62 \lsdlocked0 Light Grid Accent 4;
\lsdsemihidden0 \lsdunhideused0 \lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority65 \lsdlocked0 Medium List 1 Accent 4;
\lsdsemihidden0 \lsdunhideused0 \lsdpriority66 \lsdlocked0 Medium List 2 Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 4;
\lsdsemihidden0 \lsdunhideused0 \lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority70 \lsdlocked0 Dark List Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority71 \lsdlocked0 Colorful Shading Accent 4;
\lsdsemihidden0 \lsdunhideused0 \lsdpriority72 \lsdlocked0 Colorful List Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority73 \lsdlocked0 Colorful Grid Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority60 \lsdlocked0 Light Shading Accent 5;
\lsdsemihidden0 \lsdunhideused0 \lsdpriority61 \lsdlocked0 Light List Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority62 \lsdlocked0 Light Grid Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 5;
\lsdsemihidden0 \lsdunhideused0 \lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority65 \lsdlocked0 Medium List 1 Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority66 \lsdlocked0 Medium List 2 Accent 5;
\lsdsemihidden0 \lsdunhideused0 \lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 5;
\lsdsemihidden0 \lsdunhideused0 \lsdpriority70 \lsdlocked0 Dark List Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority71 \lsdlocked0 Colorful Shading Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority72 \lsdlocked0 Colorful List Accent 5;
\lsdsemihidden0 \lsdunhideused0 \lsdpriority73 \lsdlocked0 Colorful Grid Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority60 \lsdlocked0 Light Shading Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority61 \lsdlocked0 Light List Accent 6;
\lsdsemihidden0 \lsdunhideused0 \lsdpriority62 \lsdlocked0 Light Grid Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 6;
\lsdsemihidden0 \lsdunhideused0 \lsdpriority65 \lsdlocked0 Medium List 1 Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority66 \lsdlocked0 Medium List 2 Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 6;
\lsdsemihidden0 \lsdunhideused0 \lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority70 \lsdlocked0 Dark List Accent 6;
\lsdsemihidden0 \lsdunhideused0 \lsdpriority71 \lsdlocked0 Colorful Shading Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority72 \lsdlocked0 Colorful List Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority73 \lsdlocked0 Colorful Grid Accent 6;
\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority19 \lsdlocked0 Subtle Emphasis;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority21 \lsdlocked0 Intense Emphasis;
\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority31 \lsdlocked0 Subtle Reference;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority32 \lsdlocked0 Intense Reference;
\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority33 \lsdlocked0 Book Title;\lsdpriority37 \lsdlocked0 Bibliography;\lsdqformat1 \lsdpriority39 \lsdlocked0 TOC Heading;}}{\*\datastore 010500000200000018000000
4d73786d6c322e534158584d4c5265616465722e352e3000000000000000000000060000
d0cf11e0a1b11ae1000000000000000000000000000000003e000300feff090006000000000000000000000001000000010000000000000000100000feffffff00000000feffffff0000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
fffffffffffffffffdfffffffeffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
ffffffffffffffffffffffffffffffff52006f006f007400200045006e00740072007900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000016000500ffffffffffffffffffffffffec69d9888b8b3d4c859eaf6cd158be0f000000000000000000000000a08c
2feb6d31cc01feffffff00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff00000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000105000000000000}}